Most of us have heard about AutoLisp before, but are usually scared of it because we are not software engineers. Others haven’t even heard of Lisp files.
If you can find yourself one of these people don’t worry, you don’t have to be a software developer in order to use Lisp. You can dramatically accelerate your work by automating some simple processes.
What is AutoLISP?
According to the Wikipedia AutoLISP is a dialect of the LISP programming language built specifically for use with the full version of AutoCAD. Application for using AutoLISP code is Not included in the AutoCAD LT product line.
Find the full Wiki article here.
How to Use AutoLISP
First, search in Google for Lisp programs related to your work. You have to download one file with .lsp extension (*.lsp). However, in many forums, you will find the code of the program as text. To use it, just copy the whole code, open a Notepad and paste it there. Then save the file and change it’s extension to .lsp
(To change a file’s extension open My Computer, go to View and check File Name Extensions. Then just click rename and change the extension)
Secondly, load the Lisp file by going to Manage and clicking on Load Application. Or type on command line APPLOAD. And then select the .lsp
Finally, activate the program by typing on the command line the Lisp’s command. Usually, the name of the Lisp is the same as the trigger command, or the command is written in the site where you have downloaded the lisp.
In some cases, usually, when you find the program code in a forum, the trigger command is not written. Then you have to take a look at the code and find the line which starts with: defun: the text right after defun: is the trigger command. For example:
(defun hello () (princ “\nHello World!”) (princ) )
The command is helloDraw Order Shortcuts! (Bring to Front and Send to Back)
When you find a program that you like and use on daily basis you can include it in the Startup Suite. That way the Lisp will be loaded every time you open your AutoCAD. To do that, go to Load Application, then under Startup Suite click on Contents. There you can add all the AutoLisp programs you like.
Note: My advice is not to include too many Lisps because this may slow down opening of the drawing files, because AutoCAD will load all the programs Every time.
Here are some interesting topics with included AutoLISP programs we have shared:
- Editing Multiple Text in AutoCAD! (One Click Solution!)
- Draw Order Shortcuts! (Bring to Front and Send to Back)
- Multiple Text to MText Without Moving! (Convert Text to Mtext Without any Formatting!)
- Automatically Assign Elevations to Polyline (Set Elevations to Polyline!)
- Total Length, Area, and Volume of Multiple Objects. EASY!
You can find many more AutoLISP and other AutoCAD Related Content Here