Page 1 of 1

replacing sub assembly and keep mates.

Posted: Mon Jul 26, 2021 1:22 pm
by colt
I have multiple assemblies that mate using the same connector. In the beginning we made modules from scratch that used this connector. As time went on we used pack and go to progress these products. Now when we replace the module in an assembly it may or may not keep its connector mate depending on its parent module. Also, if we build an assembly from scratch the connector will not automatically attach mates during the replace.

Is there a way to retroactively tell these modules to behave like they were all derived from a single source assembly?

Re: replacing sub assembly and keep mates.

Posted: Mon Jul 26, 2021 1:48 pm
by matt
You can right click on the face of the connector to use the "Named Entity" thing. I don't think you can get that to fix anything retroactively, but moving forward it should be ok (as long as the correct face in the new assembly is named the same).

Re: replacing sub assembly and keep mates.

Posted: Mon Jul 26, 2021 1:49 pm
by berg_lauritz
As far as I know here are some notes on this:
  1. If you have an assembly structure, that goes multiple levels down, the replace only works properly in the level, where you replace it.

    i.e. assembly a, b form assembly c
    assembly c, d form assembly e
    you replace assembly a with assembly x
    replace mates works only within assembly c
    your new assembly c (consisting of x,c) shows missing entities in assembly e
  2. replacing mates uses the name of the entity you just mated to

    i.e. if you mate only to the standard planes, it will mate to the standard planes too
    if you mate to face1 and edge3 and the part changes in an unfortunate way - face1 can be a different face of a very similar part and edge3 can suddenly be a different edge, thus creating a lot of failed mates/errors
Can you attach a part/assembly, so we have a better idea of what you're dealing with?

Re: replacing sub assembly and keep mates.

Posted: Mon Jul 26, 2021 2:23 pm
by colt
Yeah I figured it would not be retroactive. I was hoping though.

It seems like if using mate references it is more stable. I will have to look into the named entity feature.

Attached is example of problem.

Thanks for looking at it.

Re: replacing sub assembly and keep mates.

Posted: Tue Jul 27, 2021 5:14 pm
by colt
Today I found a solution that it will always reattach mates, even if the assembly is constructed manually, as long as the assembly ID of the component is the same in both modules. The problem is that older assemblies we made had IDs in the teens because we deleted and added the connector rather than reusing the original that had ID <1>.

I need a way to easily set the assembly ID of a component. Right now the only way to get it back to 1 is to delete all instances of the connector in the assembly and restart solidworks. Then the next time the connector is added to the assembly its ID will be reset as 1. This will fully fix my problem but will create massive errors in drawings and assemblies as all references are broken.


In search of a usable solution I found that the following will reset the ID without jacking up mates or drawings.

-Make the connector independent from assembly. (Resultant new components will start at 1)
-Save assembly. Close and restart SW. (Resets original component counter)
-Replace temporary connector with original.

The new connector ID will be set to 1, dimensions and mates still works, and replace subassembly auto adds mates.

Ensuring all connectors IDs are <1> is the key.