×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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?

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.
http://www.geocities.com/segurucool
Good Luck.

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

(OP)
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.

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

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.

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

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources