[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.
Make LISP Functions on the Fly
Tip# 4348 By James Maeding On 26-Jul-2014
Rated By 0 users Downloaded : 385
Categories : Programming Examples
Software type : AutoCAD 2015
Rename File To : func1.lsp
These two examples create layers and change entity colors.

James Maeding sent in these nice examples of defining LISP functions on the fly. One of the two examples provided defines the LISP functions L1, L2, L3 … L255 used to create layers with certain properties. The other one defines the LISP functions C1, C2, C3 … C255 used to change the color of selected entities. In each case there are 255 functions created, but only one set of code to maintain when changes may arise. Maybe you can think of other ways you can use this, and modify the supplied code as desired. James has provided plenty of comments and noted the locations most likely to be modified by the user. Thanks, James.


Average Rating:

User comments