Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Auto file rename with solidworks and VB 1

Status
Not open for further replies.

RonaldMasevon

Mechanical
Mar 11, 2009
2
Hi,

I like to automate the renameing of solidworks files (numbers). I tried to do this with recorded "save as" code in VB but the references in solidworks drawings are then broken. Is there anny vb code with the "solidworks rename" type of rename?

Thanks
Ronald
 
Replies continue below

Recommended for you

What I do manually tells me the drawings have to be open when you do the part or ass'y file save as . . .
The reference then updates, but you also have to do a drawing file save as . . .
Can the part file reference in the drawing file be changed with a VB program?? hmmm.

'thinks not = disappears'

--
Hardie "Crashj" Johnson
SW 2008 SP4
Nvidia Quadro FX 1000
AMD Athalon 1.8 GHz 2 Gig RAM

 
Thanks Snowcrash,

I also had to rename the drw file but i did this with windows rename...
Now i first open the part and after that the drawing an then save as for both... it works! So thanks a lot!
Ronald
 
To do this w/ API, you need to use the SW Document Manager object. This is advanced stuff you will not learn from recording macros. Also, the SWDM requires a license key. The license key is free but you must request one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor