Having used the SW 2009 task scheduler to mass export asPDFs, we were disappointed for the following reasons:
1. Every file is re-exported, even if a current PDF alreadyexisted. (We only wanted updated and new files to be converted.)
2. A "Pro" license was in use whenever the task scheduler wasrunning.
3. A separate job had to be scheduled for each and every subfolder.
So using a bit of scripting and the snippet that was in SW APIhelp, I tailored a macro to fit our needs. You may edit it for youparticular situation.
In a nutshell, this macro:
1. loops through our drawing subdirectories and compares timestampsof drawings with their PDF counterparts (in a different location)
2. If the PDF is outdated, or does not exist, then the drawing isopened, exported as a PDF, and closed.
3. The macro closes SW when finished, but you could remove thisline if you want to run-on-demand (menu or toolbar, for example).We use the Windows task scheduler to run the macro at the end ofevery weekday, so it was necessary to close SW and free-up theseat.
Open SW and create a macro with the text from the attached file. Itis in plain text (had to zip it for the forum to accept it).
To use from the command line or Windows task scheduler:
Run SW executable with "/mmacroname.swp"
This script is as-is, with no liability assumed on my part. Use ormodify at your own risk.
Tim Yogerst
Network Administrator
Phoenix Products Company
EmailSolidworksImport export
1. Every file is re-exported, even if a current PDF alreadyexisted. (We only wanted updated and new files to be converted.)
2. A "Pro" license was in use whenever the task scheduler wasrunning.
3. A separate job had to be scheduled for each and every subfolder.
So using a bit of scripting and the snippet that was in SW APIhelp, I tailored a macro to fit our needs. You may edit it for youparticular situation.
In a nutshell, this macro:
1. loops through our drawing subdirectories and compares timestampsof drawings with their PDF counterparts (in a different location)
2. If the PDF is outdated, or does not exist, then the drawing isopened, exported as a PDF, and closed.
3. The macro closes SW when finished, but you could remove thisline if you want to run-on-demand (menu or toolbar, for example).We use the Windows task scheduler to run the macro at the end ofevery weekday, so it was necessary to close SW and free-up theseat.
Open SW and create a macro with the text from the attached file. Itis in plain text (had to zip it for the forum to accept it).
To use from the command line or Windows task scheduler:
Run SW executable with "/mmacroname.swp"
This script is as-is, with no liability assumed on my part. Use ormodify at your own risk.
Tim Yogerst
Network Administrator
Phoenix Products Company
EmailSolidworksImport export
