Formatting AutoLISP Code

AutoCAD AutoLISP & Visual LISP

 
Formatting AutoLISP Code
 
 
 

The extensive use of parentheses in AutoLISP code can make it difficult to read. The traditional technique for combatting this confusion is indentation. The more deeply nested a line of code is, the farther to the right you position the line.

If you use the VLISP text editor to enter your code, VLISP automatically formats the code as you enter it. VLISP also has features to reformat a selection or an entire file. This improves the appearance of your code, making it more readable. For information on using these features, see Formatting Code with Visual LISP.