I just wanted to say thanks to southie, I found his code here and it will save a lot of time since I have 1000's of files that need converted using the same lisp. I had to do a little tweaking for my pourposes but it saves tones of time.
I wrote a program for Philadelphia Gas Works that processed 23 actions on over 13,000 dwgs (one at a time) in a directory tree with many branches on one (1) slow computer running one (1) session of AutoCAD in about 2 hours, with zero errors.
I can't share all the code as it is their intellectual property, but I can share the method for finding and opening all the files. It is 100% AutoLisp / Visual Lisp. It is up to you (and/or the smart contributors here) to write the code for the actions you want to take on each file. If I recall correctly, you need a unique acaddoc.lsp file. I can show you, but it will take me some time to extract and assemble the non-proprietary code.
John F. Uhden
I have similar needs to plot all layouts of all dwg in selected folder, to either printers or plotter. I like the 'PurgeAuditFiles.lsp' , but not for purge and audit but for plotting/printing.
Beside the printing, if possible, I would like to have an option to create pdf files (using DWG to PDF.pc3) of all layouts into a single pdf (if it's possible using the .pc3). Eg. If there are 10 dwgs of multiple layouts, it would create 10 pdf of multiple pages as per dwg. Each of our dwg layouts have a PDF setup configured. If we can use 'Publish' rather than 'Dwg to PDF.pc3', that would be better. Basically, its print or pdf all dwg in a folder. Thanks for any help.
Hey there, came across this thread because I am basically working on the same thing right now. While I can't just upload the code (company property and all), I can tell you what I am more or less doing.
First I created a script for loading all of the file information of the DWG files I want to plot. I took the file data and created a custom DSD file (batch print a few files to see what the file structure is, then use autolisp file io to create a custom one each time).
Once the dsd is made, I have my autolisp function call -PUBLISH (or +PUBLISH seems to do the same), load the dsd and we're on our way!
NOTE: in the dsd file you will want to call the page setup (configured in the page setup manager). If the dimensions for each of the sheets is the same, then you can configure one sheet and use the psetupin command to import from the configured sheet.
Hope this helps!
Can't find what you're looking for? Ask the community or share your knowledge.