Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Options

Replacing a part in all assemblies

Edward_HarrisEdward_Harris Member Posts: 7 PRO
We are in the process of replacing all instances of some specific fasteners and other parts in our product portfolio. Specifically some fasteners. We cannot, however, seem to find a convenient way of doing this. Originally, we were hoping to be able to just delete the old part and replace it with the new one, as we opened to relevant asseblies and discovered an error refering to this part being missing. We have unfortunately found out that this is not possible, as deleting the old part, does not bring up an error message in the assemblies where it is used.

Is there a clever way of replacing all instances of a part, in all relevant assemblies with a new one?

Answers

  • Options
    billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,015 PRO
    edited May 2023
    1st thing is to understand what an instance is inside an assembly. Sounds like you know this. Next lookup replace instance. It's a command whose scope is the current assembly. I don't believe it's recursive and won't dance through your structure. 

    I don't replace instances for an entire project. Most times I'm replacing because onshape changes the id due to changes I make to the part and the assembly the reference errors out. It's easier to replace instance than delete and add. It's interesting because many of the face ids are still valid so the part orients inside the assembly.

    Does anyone know if replace instance is recursive?


  • Options
    wout_theelen541wout_theelen541 Member, csevp Posts: 198 PRO
    edited June 2023
    Using replace instance will only change instances within that assembly but not in subassemblies.

    If you want to want to update a fastener in all assemblies the easiest way would be to update the fastener itself. If you are want to replace the fasteners with entirely new ones from a different document it will be more intensive especially if the mate connectors need to be updated. To do this there are 2 ways that I can think of but if anyone else has ideas let me know. 

    1: Via your top level assemblies and go into each subassembly and replace instances there
    2: Go into your old fasteners latest version and look up where used and go into documents through there.

    In both of these cases I would then create a new version of the old fastener and if you've replaced everything then you shouldn't get a prompt to update.

    If this is still going to be too much work I would contact support. As far as I can see though there isn't really a clever way to do this (for now) just a lot of hours.
Sign In or Register to comment.