LISP Routines

LISP

LISP is a powerful programming language that was created in 1956. LISP stands for LISt Processing or Lost In Stupid Parenthesis, depending on how the day is going. One of the many uses of LISP is Artificial Intelligence. There are many different variations of LISP including two types that AutoCAD uses. AutoLISP and Visual LISP are AutoCAD's versions of LISP. AutoLISP was released in AutoCAD 2.1. Since then there have been many additions to the language that help with the ease of drafting and programming AutoCAD. Visual LISP was released with AutoCAD 14. Along with Visual LISP AutoCAD came with a LISP IDE (Integrated Development Environment). By typing VLIDE at the command line you can access AutoCAD's LISP IDE. Once inside the IDE you can write several different types of code. In this section we will focus on AutoLISP and Visual LISP.

There are differences between AutoLISP and Visual LISP. One major difference is you can not use Visual LISP code on AutoCAD releases prior to release 14. The major difference between the two is how they access different information inside of AutoCAD. Both have their advantages and disadvantages. Fortunately you can have only AutoLISP code, only Visual LISP code, or both types of code in a single LISP file. Many programmers refer to it as LISP, partly because they are easily interchangeable.

LISP is a great tool to customize AutoCAD. Included with AutoCAD are a number of sample LISP routines, tutorials, and the IDE. You do not need to use the IDE, but it helps greatly when trying to debug a program. In fact you can use any ACSI editor to write LISP code. One program you should not use is Word or other text editors that use smart quotes. This can confuse AutoCAD when tring to run the code.

Whether you are a veteran or beginner I hope you find the tools I have provided helpful with writting your code. I will continually add, modify, an update the code that is posted, so be sure to check back often. If you have any questions or comments feel free to email me.