Quick Access Search All Tools Ctrl+K Help & Tool Guide

Use the builder below to generate ready-to-use AutoLISP routines. Fill in the form, click Build LISP, then copy and paste the code into AutoCAD's VLISP editor or a .lsp file.

Current layer name:
New layer name:
Layer name to make current:
Layer name:
Action:
Layer name:
Color (1–255):
Zoom method:

This routine runs PURGE ALL repeatedly until nothing more can be removed, then runs AUDIT to fix any errors. A standard pre-transmittal cleanup routine.

← Fill in the form and click Build LISP

How to Run LISP Code in AutoCAD

MethodStepsBest For
Command line (one-time)Copy the code → paste at the AutoCAD command line → press EnterQuick one-off use
APPLOAD commandSave code as a .lsp file → type APPLOAD → browse and loadLoading a routine you'll use regularly
VLISP editorType VLISP → paste code → Tools → Load Text in EditorDebugging and development
Startup (acaddoc.lsp)Add code to acaddoc.lsp in your AutoCAD support pathAuto-loading every session
💡 Tip: After loading a routine with APPLOAD or VLISP, call it from the command line by typing its function name (e.g. if the code defines (defun c:RELAY ...), type RELAY at the command line).
📖 More LISP scripts: Visit the LISP Scripts page for a library of pre-built routines, or LISP Snippets for short code examples.