Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

I am looking for some Solid Edge VBA help! 1

Status
Not open for further replies.

marksline

Industrial
Joined
Mar 15, 2004
Messages
5
Location
US
I am trying to edit the linked part to a draft file using VBA. Can anyone help? For example: I have adraft file with part "A" linked to the draft, and I want to chnage the link to part "B" instead.
 
Hello, you must use replace command that you can find
in the online help.

Do you make some macros in VB for Solid Edge?
I use Solid Edge for my job and I make macros for Draft,
Part and Assembly. I think it is interesting
if we exchange our knowledge.
Visit this website, I find it very interesting:
 
Thanks for the info. Do you have any examples of your use of replace? I am more of a compiler than a programmer. I am createing a rules based configurator in Excel, using VBA as my programming language. I have my rules laid out in "if..hen..else" comments. It pulls data from SQL data base to populate dimensions. It works pretty well. I am able to change the variables and part properties. But, I have not found a good example of changing or replacing the linked part to a draft file. How can I get in touch with you?
 
this is an example:
Set objApp = CreateObject("RevisionManager.Application")
' Open the top level assembly.
Set objDocument1 = objApp.Open("example.asm")
objDocument1.Copy ("newfilename.asm")
Set objAsmDocuments = objDocument1.LinkedDocuments(0)
For Each objlinked In objAsmDocuments
objlinked.Copy ("copy.par")
objlinked.Replace ("replace.par")
Next
-------
I hope it work properly.
 
That looks like what I need, I will try it now. Thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top