[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Batch LISP
Tip# 1956 By Jeffery Sanders On 01-Jun-2004
Rated By 1 users Downloaded : 1136
Categories : Programmer's Tools, LISP Code Modules
Software type : AutoCAD
BATCHLISP.LSP builds a script file that runs a LISP program of your choice on a selected set of drawings.

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.



Average Rating:

User comments