LISP routines are plain text files with a .lsp extension. AutoCAD has had a built-in LISP interpreter since version 2.1 — which means almost any version you're running can execute them. The challenge is knowing how to get a file loaded and running.
Here are the four main ways to load a LISP file, from quickest to most permanent.
The fastest way for a one-time load. Simply drag the .lsp file from Windows Explorer directly into the AutoCAD drawing window. AutoCAD will load and execute it immediately. Any commands defined in the file are now available for the rest of that session.
Downside: the routine is gone when you close and reopen AutoCAD.
Type APPLOAD at the command line and press Enter. A dialog box opens where you can browse to your .lsp file and click Load. There's also a "Startup Suite" section at the bottom — add your file there and it will load automatically every time AutoCAD starts.
Tip: If AutoCAD blocks the file with a security warning, you need to add the folder to your trusted paths. Type TRUSTEDPATHS at the command line and add the folder containing your LISP files.
You can load a LISP file programmatically using the load function directly at the AutoCAD command prompt:
(load "C:/Tools/MyRoutine.lsp")
Note that AutoCAD LISP paths use forward slashes, not backslashes. This is useful when you want to load a specific file quickly without opening a dialog.
If you place a file named acaddoc.lsp in a folder that's on AutoCAD's support file search path, AutoCAD will load it automatically every time a drawing opens. This is the most powerful option for routines you use constantly.
acaddoc.lsp(load "C:/Tools/MyRoutine.lsp")acaddoc.lsp in a trusted support path folderOnce a routine is loaded, any commands it defines are available at the command line. For example, if a routine defines a command called FIXLAYERS, simply type FIXLAYERS and press Enter to run it — exactly like a built-in AutoCAD command.
SECURELOAD — if set to 1 or 2, LISP files must be in a trusted path. Add your folder via TRUSTEDPATHS.All routines on this site are tested and ready to drop into AutoCAD. No setup beyond loading the file.
Browse LISP Tools →