I'm new to using macro's / API in solidworks and I've not done any coding for many years.
We have about 600 drawings which have an incorrect digit within the FileName & CustomProperties. We're tried modifying some code which we found on this forum (https://forum.solidworks.com/thread/55477#291437). But it seems to have rebuild even before we started chaning it on "Set swModelDocExt = swModel.Extension", is this becuase we're trying to use swModel on a slddrw? Or because things have changed on soldiworks in the last 4 years?
We are using Premium 2015 SP5
We're trying to create a macro to find (“-1-“) and replace
(“-X-“) within the customer properties (GE_DrawingNumber & GE_Parent) of a
GE_DrawingNumber = “-1-01-017”
GE_Parent = “-1-01-005”
GE_DrawingNumber = “-X-01-017”
GE_Parent = “-X-01-005”
The 017 & 005 will change from drawing to drawing.
I've attached my attemp at moifying the above code but I am struggling as I can't run the base code. Do I need to install anything extra to run macros / API
We need to update all the drawings to find (“-1-“) and
replace (“-X-“) within the file name of our drawing set, then save as the new
Files Name = “SSP41848-1-01-017”
Files Name = “SSP41848-X-01-017”
The 017 will change from drawing to drawing.
We're currently not looked into this one.
Any assistance you could offer would be greatly appreciated.