Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you change the part linked to a draft using VBA?

Status
Not open for further replies.

marksline

Industrial
Mar 15, 2004
5
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?
 
Replies continue below

Recommended for you

I don't know how to code this myself, but it may come under the "Revision Manager Rename" method.
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.
Good Luck.
 
beachcomber, thanks you for the help. I looked at the path you gave me. The rename method was not exactly what I needed, but the Replace method right below it does seem to have some merit. Thank you for the suggestion.
 
I’m just tring to write a macro to copy an asm from a folder to another folder with all the linked object.
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.
 
SEpj - just some things to think about.
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor