When I select a machine and use pack and go, I have to manually select the drawings of the assemblies to export. Is there a way to only have the drawings from assemblies extracted and have the drawings of parts ignored?
Is you drawing number same as your assembly? If yes then search for the assemblies in the folder and change the extension to drawing to open only assembly drawings.
are there any distinguishable characteristics between part drawings and assembly drawings? The folders they reside, or a specific type of string in the filename perhaps?
Sadly not for all assemblies. Some are grouped correctly but we cannot use that fact because sometimes it is placed somewhere else in PDM.
The best would be code that would find an assembly, and then looks if that assembly has a slddrw.
Fair enough. Would be difficult to get Pack and Go to do this though. Maybe potential to Pack and Go with all drawings then create some secondary process to delete drawings which match part filenames?
the problem is, I need this for all assembly drawings of all the machines we made. (first it will has to work some 15000 files, then it is up to date and it will check each day if engineers added or updated those assemblies).
I'm assuming that because you're posting this in the PDM section, you're using it? In that case, could you set up a variable to have a particular setting for assemblies, and then link it to the drawing? It would require some set up, along the lines of:
Alternatively, you could identify the drawings of .sldprts with a similar method, and then delete them from the complete pack and go - that might be easier if you wanted to export the assemblies, and child parts as well, which makes sense.
Would it be possible to have a macro in Solidworks first check every slddrw file for having more than 1 item under "Bill of Materials"?
I now have code that opens every slddrw in a certain folder, but if it would check that first it would only find assembly drawings.
that could work indeed. Will try it out!
It works! Man, I just love your logical and practical thinking!
Retrieving data ...