We can have there way to Update References for a .sldasm file when use API if cannot want to open file in SolidWorks.
1.SwDMDocument18.ReplaceReference(OriginalReference, ReplacementReference) in SwDMClassFactory class;
2.IEdmRawReferenceMgr.UpdateReferences(refs) in EPDM.Interop.epdm class
3.ISldWorks.ReplaceReferencedDocument(ReferencingDocument, ReferencedDocument, NewReference)in sldworks class
And then,I Have tried all.
1.the code do smart,but there are not effect to change the reference,the referencr is old.
2.then code when running UpdateReferences(refs) cannot do and tip the Paramter error.
3.the code is do and we can see the most reference is update,but,same toolbox part is not updated.
so,what can i do and have a perfect outcome?
SolidworksApi macros