I have a SolidWorks assembly file that I am copying in VB.Net into the same folder as a new name. So I now have two assemblies that are identical, but different names. The code I'm using to do this is:
This works fine, and copies exactly how I want it to. Right after this code is ran, I use the replace component code from the following link:
http://help.solidworks.com/2012/English/api/swdocmgrapi/Replace_Component_Example_VBNET.htm
I replaced the license key, and the directory for that of the C:\NewCopied.sldasm as well as the components to replace, and it will not work. If I open up C:\NewCopied.sldasm, the components I told it to replace are not replaced. It even says "True" on the output in Visual Studio that the swDmComponent.Replace went through just fine.
If I use the same code, and only change the assembly to a different one, it works fine. Is there something about copying the file that makes it to where the document manager doesn't interact with it correctly?
Thanks,
SolidworksApi macros