If you use computer-aided design (CAD) software, such as AutoCAD, Briscad or IntelliCAD, at some point you are likely to need additional customization or automation features in your CAD environment.
This is where AutoLISP steps in. AutoLISP is a simple, lightweight programming language built specifically for use with CAD software.
A Brief History of AutoLISP
AutoLISP is a dialect of the LISP programming language, customized and streamlined for use in the AutoCAD environment. LISP is a family of programming languages dating back to 1958. The name LISP is derived from "List Processor," and linked lists are one of LISP's major data structures.
AutoLISP was first introduced in Autodesk's AutoCAD version 2.18 in 1986, and was continuously improved in new releases up to release 13 in 1995, when Autodesk halted AutoLISP development in favor of more modern development environments like VBA or .NET. Despite this, AutoLISP has remained the primary customization language for many AutoCAD users.
In 1997 Autodesk released AutoCAD 14, and introduced Visual LISP as a commercial add-on for AutoCAD. Visual LISP includes an integrated development environment (IDE), debugger and compiler, and ActiveX support. With the release of AutoCAD 2000 in 1999, Visual LISP was incorporated in AutoCAD as a replacement for AutoLISP. Since then, major enhancements to Visual LISP have been halted by Autodesk in order to focus on VBA, .NET, and C++.
Visual LISP and AutoLISP remain supported in AutoCAD to this day, while support for VBA versions older than 7.1 has been dropped as of January 31, 2014. Many other CAD software vendors also adopted support for AutoLISP in their own products, due to the big user base, as well as many utilities and applications available in AutoLISP.
Why Do People Still Use AutoLISP Instead of C++?
If you use the full version of Autodesk AutoCAD, the AutoLISP compiler is already included in AutoCAD and ready to use. There is also a nice IDE on board – Visual LISP. Please note that AutoCAD LT editions do not have built-in support for AutoLISP.
Most AutoCAD users, or users of similar CAD solutions, are not familiar with programming and programming languages, so learning C++ to create a simple program or a function for automation in AutoCAD would not be practical. AutoLISP is simple, streamlined, and much easier to use and learn than C++ or Visual Basic, and everything you need to start programming is already included in AutoCAD.
Programs and utilities written in AutoLISP are easily accessed and executed from AutoCAD. These are the main reasons that make AutoLISP the best option for customizing AutoCAD by its users.
AutoLISP is an interpretive language, it is not compiled, so it can be stored in an ASCII text file, loaded, and then executed directly within AutoCAD. Almost all operations that you perform manually in AutoCAD can be performed automatically using AutoLISP.
AutoLISP has a rich set of functions that you can use to perform any activity in AutoCAD, like general programming functions for variable manipulation, decision control, loops, arithmetic operations, error handling and function handling. It also has specialized functions in a number of areas such as: geometry, display control, query and command, user input, and object handling. AutoLISP also features a Dialog Control Language, a built-in GUI mini language for creating modal dialog boxes with automated layout in AutoCAD. All platforms that can run AutoCAD support AutoLISP as well.
There are certain factors that can make learning AutoLISP easier. If you are an experienced AutoCAD user, learning AutoLISP will be easier for you. AutoLISP is essentially a way to control AutoCAD, so the better you know AutoCAD, the better you will know what needs to be done to control it automatically.
AutoLISP is a very simple language to learn, and probably the most productive out of different Application Programming Interfaces (APIs) built into AutoCAD. With these tutorials, you will probably be ready to write your own useful programs in no time.
- AfraLISP has an excellent collection of AutoLISP free learning tutorials, and resources for beginners, intermediate and advanced users.
- Autodesk's official AutoLISP Developer's Guide provides a step-by-step overview of the main topics and workflows for using the AutoLISP programming language. Also of interest is their official AutoLISP function reference, which will surely come in handy while programming in AutoLISP.
- Mastering AutoLISP in 80 Minutes is a Power Point presentation from Augi CAD Camp 2005, free to download. It covers the basics of AutoLISP and is intended for intermediate AutoCAD users.
- Start with AutoLISP is a detailed free AutoLISP course. You can also download the course.
- AutoLISP Quick Start at CADTutor.net is aimed at AutoCAD users who would like to start learning AutoLISP.
- Your First AutoLISP Program: Zoom to Origin is a short tutorial showing the basics of writing a short AutoLISP program in Visual LISP Editor in AutoCAD.
- Lee Mac Programing has interesting resources for AutoLISP, like tutorials and many functional AutoLISP programs that you can download and study.
Numerous books dealing with AutoLISP and its use in AutoCAD are widely available. You may find some of these books very helpful in learning how to program in AutoLISP, although we would suggest going through the online tutorials first.
- AutoLISP Programming: Principles and Techniques by Rawis and Hagen provides practical and easy-to-follow instruction in mastering the AutoLISP programming language.
- AutoCAD Platform Customization: User Interface, AutoLISP, VBA, and Beyond by Lee Ambrosius is a comprehensive guide to streamlining and personalizing the AutoCAD platform. The AutoLISP and VBA programming languages open up a myriad of customization options, and this book provides expert guidance toward applying them to AutoCAD, Civil 3D, Plant 3D, and other programs based on the Autodesk AutoCAD platform.
- AutoCAD expert's Visual LISP by Reinaldo Togores: shows LISP programming techniques, including the use of the Visual LISP Integrated Development Environment, explained starting from scratch.
Even though AutoLISP is derived from LISP, a very old programming language, AutoLISP still remains a very valuable tool for AutoCAD users. AutoLISP is still the tool of choice for customization and automation in AutoCAD and other CAD software with AutoLISP support.