AutoCAD

How to Save Lisp in AutoCAD?

Understanding AutoCAD LISP

AutoCAD allows users to automate tasks through a powerful scripting language known as LISP. This feature can greatly enhance productivity by enabling the creation of custom commands that simplify complex workflows.

Steps to Save LISP in AutoCAD Permanently

  1. Access the APPLOAD Command:
    Begin by typing APPLOAD into the command line within AutoCAD and hit Enter. This command opens the Load Application dialog.

  2. Open the Startup Suite:
    In the Load Application dialog, locate the Startup Suite section. Click on the Contents button. This area enables you to manage which LISP routines load each time AutoCAD is opened.

  3. Add Your LISP File:
    Click the Add button within the Startup Suite window. A file browser will appear. Navigate to the directory where your LISP file is stored, select the desired .lsp file, and click Open.

  4. Finalize Your Selection:
    After adding all desired LISP routines, close the dialog by clicking the Close button. This ensures that the routines will automatically load upon launching AutoCAD in the future.

Locating LISP Files in AutoCAD

To find your LISP files, you can check within AutoCAD’s support file paths. A common default location is C:\Program Files\Autodesk\AutoCAD 2025\Support, though it may vary based on your installation or specific version. To view these paths:

  • Open the Options dialog from the Tools menu.
  • Navigate to the Files tab and expand the Support File Search Path section. Here, you will see all directories AutoCAD checks for support files, including your LISP routines.

Creating Your Own LISP in AutoCAD

Developing a new LISP routine involves a few straightforward steps:

  1. Enter Options:
    Start by navigating to Tools > Options in the menu.

  2. Define File Locations:
    Find the File Locations tab, expand the Support Files Search Path, and click on New. Browse to a folder where you want to save your LISP files, such as D:\LISP Files.

  3. Apply Changes:
    Move this path up in the list to ensure it gets prioritized. After applying the changes, restart AutoCAD. This will allow your new LISP files to load automatically.

Editing Existing LISP Routines

To modify a LISP file that you have already created:

  1. Launch AutoCAD:
    Start your AutoCAD application.

  2. Open Visual LISP Editor:
    Navigate to the Tools menu, select AutoLISP, and then choose Visual LISP Editor. Alternatively, you can open it directly by typing VLIDE or VLISP in the command line.

  3. Edit Your LISP Code:
    Use the editor to make any desired changes to the code. Once you finish editing, save the file.

Executing a LISP Routine in AutoCAD

To run your LISP routine:

  1. Customization Interface:
    Type CUI in the command line to access the Customize User Interface dialog.

  2. Load Your LISP File:
    Locate the LISP Files category within the Customization section. Right-click this category and select Load Lisp from the context menu. Browse to your LISP file’s location, select it, and confirm.

  3. Execute:
    Your routine is now loaded and ready to use.

Frequently Asked Questions

Can AutoCAD LT run LISP routines?
No, AutoCAD LT does not support AutoLISP and does not provide access to the APPLOAD command.

What is the purpose of the acaddoc.lsp file?
The acaddoc.lsp file is used to load LISP routines automatically for each new or opened drawing, streamlining your workflow by ensuring that necessary commands are readily available.

How can I copy LISP code?
To copy LISP code, open a text editor such as Notepad or access the Visual LISP Editor in AutoCAD. You can then paste the code from your source, such as a tutorial or template, for editing or use.

About the author

Wei Zhang

Wei Zhang

Wei Zhang is a renowned figure in the CAD (Computer-Aided Design) industry in Canada, with over 30 years of experience spanning his native China and Canada. As the founder of a CAD training center, Wei has been instrumental in shaping the skills of hundreds of technicians and engineers in technical drawing and CAD software applications. He is a certified developer with Autodesk, demonstrating his deep expertise and commitment to staying at the forefront of CAD technology. Wei’s passion for education and technology has not only made him a respected educator but also a key player in advancing CAD methodologies in various engineering sectors. His contributions have significantly impacted the way CAD is taught and applied in the professional world, bridging the gap between traditional drafting techniques and modern digital solutions.