If you want to do something similar inside Visual LISP, Jeff Sanders' Tip #1956 (Batch LISP) builds a script file that loads and runs a Visual LISP module of your choice in a selected set of drawings. Because Visual LISP maintains a memory map for each open drawing in MDI (multiple document interface) mode, you can't have a Visual LISP function run against multiple drawings. Each time a drawing becomes the active document, the memory map sets for just that drawing. One way around this is to use the object references in Visual LISP to prevent the other document from becoming the active one. This isn't easy, but as Jeff shows us, where there's a will there's a way. He began by using a script file created and started with Visual LISP. Scripts can load a series of drawings and evaluate (load) AutoLISP program files. Jeff's example lists the layer names in a series of selected drawings. Included in this tip is another utility that I broke out and presented as Tip #1957.
|