Is there a SW tool to replace multiple parts in multiple assemblies automatically?

 

I have hundreds of assemblies with the "old fasteners" that need to be replaced by "new fasteners". I understand that SW allows me to replace parts and every instance of a part, but is there a way to automate this already, before I write my own VBA script? I doubt that such a tool exists, so I will begin by painstakingly using artificial intelligence to write me the VBA code using SW API and tailoring it to my application. Even if the SW API included a function for replacing a part, that would get me going in the right direction. thanks for any advice!

Answers 4
AL
AL 2024-11-06 Best Answer

Why not overwrite the old files and keep the "original" copy somewhere in an archive?

DG
DG 2024-11-06

If the fasteners files names ae same, then you can point to the new location (rename old location, and add new location under referenced document path in Tools > Option > File locations)  or overwrite like @AL suggested.

OR look into using ReplaceReferencedDocument method.

 

KC
KC 2024-11-06

@DG If I may tap into your genius: How does the command you mentioned differ/be used for compared to ReplaceComponents2?
Curious as I'm writing some code for replacing components in newly created pack and go assemblies and was looking to use ReplaceComponents2 (after getting the source component via other commands).

KC
KC 2024-11-07

Thank you. I had just started this aspect of the project yesterday when I saw Mr. Gupta's post.