This helpful tip comes from Andrea Andreetti.
I've seen many AutoCAD users try to run LISP in batches. Some have created huge tools or used script, opening their drawings one by one, which wastes time. Some use ODBX, which I think is good but limited. Then there is my contribution: Why not use the Publish command? Yes, you can do just about whatever you want using the Publish command. Just write your desired commands in a LISP file, then put the LISP file in the Appload Startup Suite, and run Publish with any configuration you want. I use DWF to prevent wasting paper. Be sure to remove your LISP from the Startup Suite when you have finished. You can also purge, create objects, add blocks, etc., and because you are using Publish, you can get a print of the document at the same time. At the end of your LISP code be sure to save the drawing file with this code:
(vl-cmdf "._qsave")
That’s it! Enjoy!
Notes from Cadalyst tip reviewer R.K. McSwain: What a great tip. If you can put together a little LISP code to do what you want, you can let Pubish iterate your drawing list. As Andrea points out, be sure to remove your LISP from the startup suite when you are done, because that LISP will load for each drawing you open no matter how it is opened. |