Solidworks Macro Plane Replace Model

Hello

I have a VBA macro that allows me to save a room under another name, the plan too

The problem is that in the plan the link to the old part is still present, the macro recorder does not allow you to see the code to replace this link

 

if anyone has an idea to write the code

Replace Template: New Part File Name

Thank you


capture_000035.png

Hello;

A similar macro is available here.
-> make-independent-drawing (www.codestack.net/)

The only thing I can't change in this macro is that the new component replaces the old one in the assembly
(a CTRL+Z does the trick to restore the old Name of the copied Component but I can't automate this operation yet...
a "Replace by" operation should do the trick too....) I'm working on it.... but I'm not against a little help...)

Kind regards.
 

This solution from Codestack is much faster than opening the plan and saving, just copy paste the plan and change the link