How do you change the part linked to a draft using VBA?
How do you change the part linked to a draft using VBA?
(OP)
I am trying to update a 2D draft sheet with data from an excel spread sheet. I can make all of the variables change. But I can't find a working example of how to edit the link between the draft and the part file. For example: If part "A" is linked to the draft, but I want part "B" linked instead, what would the code look like to do that?





RE: How do you change the part linked to a draft using VBA?
Have a look at Help > Programming with SolidEdge.
Then in Contents look for Revision Manager>Properties and Methods>Rename Method.
Also have a look at the following web site - it has some Solid Edge VB examples, along with loads of other stuff.
http://www.geocities.com/segurucool
Good Luck.
RE: How do you change the part linked to a draft using VBA?
RE: How do you change the part linked to a draft using VBA?
If you have a Draft, you must read every linked document with a cycle like for … each … Next
Inside the cycle you must put the copy command.
RE: How do you change the part linked to a draft using VBA?
Someone has done a similar thing here.
Unfortunately they forgot about our "standard parts" which are held in different folders to main project files so didn't need copying.
As a result these were copied into the new project folder also, so we ended up with multiple copies and then had to change all the links back to the standard parts folder. You can't do this in Rev Manager unless you delete the ones from the project folder first and then do a replace.
They also forgot about checking to see if a file with the same name as the one being copied already existed in the destination folder.
The command was also painfully slow - unlike Rev Manager.
Best of Luck
Beachcomber