In SolidWorks PDM 2016 I have a dispatch tool that copies a drawing into a different location with a different name. I want to create an addin that will replace the reference to the assembly contained in the drawing for a different assembly on both PDM references and SolidWorks references. What would be the best way to accomplish this?
This is my train of thought
1. Once the the solidworks drawing has been copiend, Open the drawing. (or maybe just use document manager to access the file)
2. Replace the reference using something like this:
swApp.ReplaceReferencedDocument(sReferencingDoc, sOldDoc, sNewDoc)
3. Replace the reference on PDM as well (IEdmRawReferenceMgr?)
Does anyone has a better idea on replacing references in drawings stored in SolidWorks PDM?