Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

find references macro

Status
Not open for further replies.

nmaxwell

Mechanical
Oct 21, 2005
29
does anyone know of a macro that will find the references and copy the files for a part? Its rather tedeous to have to go through every part and do it manually.
 
Replies continue below

Recommended for you

mAX,
In your assembly you can click File, find references, and then copy the files. This is very easy.

dsgnr1

¿)

At some point you just have to shoot the engineer and build the dang thing.
 
well yes, I know, it is relativly simple, however its fustrating when you have to do that 50 times over for each project everytime it is updated, my main contention here is that all this work is almost completely non creative, and as such could be handled by a macro.
 
so it really is an assembly, rather thatn a part that you wish to find the references...then you want a macro to perform this.
Have you looked at the faq's under vb or programming or whatever they're calling it now?

Have you searched this forum for links to sample code?

these things (unlike my first reply) may help.

regards,

dsgnr1

¿)

At some point you just have to shoot the engineer and build the dang thing.
 
nmaxwell said:
however its fustrating when you have to do that 50 times over for each project everytime it is updated

Sounds like what you want need is PDMWorks.

Flores
SW06 SP2.0
 
You can do this very easily through a macro with a rudimentary understanding of the SOlidworks API:

1) Use "getDependencies2" method to return an array of all referenced documents in the assembly

2) Using your preferred VB copy method (FSO works well), use the names obtained in step 1 (odd numbered elements will be the full path names if you start at 0) to copy the files where you want them to go

Loop through it again to copy multiple assemblies.
 
alright so I take it there arent any such macros already, im sure its fairly simple to do, once i get some idle time ill look into it thanks, and we do use pdmworks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor