Replacing Elements of an Assembly Without Opening it - VBA

Hi all

I'm looking for a macro that allows you to replace components automatically in an assembly, without having to open it, based on different criteria. (Or to create it)

Basically, I'm looking to automate the manual reference replacement feature of Solidworks:

CaptureReplacementManuRef

Is there a way to extract (or modify) this list of referenced files, as well as their locations with a command?

Thank you

Kind regards

 

Hello

To replace the path of the referenced files without opening the assembly, you can use the function: ReplaceReference.

See example: replace-references

Thank you JeromeP,

I had seen this command, but to use it, you need to have the references of the components of the assembly. Is there a way to get them back?

You can retrieve all the parts used in the assembly with the GetAllExternalReferences4 function 

Apparently, you have to be able to use SOLIDWORKS Document Manager, unfortunately we don't have a license

Late response, but the Document Manager license is free if you have a Solidworks license.

See the steps to obtain it here

JeromeP, thank you once again;)

I'll test that when I go back to my project.