• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

AutoLISP for AutoCAD: Tutorials and 139 Free Routines

July 29, 2019

Last updated July 26, 2026

This page is the map. AutoLISP material has been published here since 1999 and the site has been online since 2003, which means the archive grew a good deal faster than any structure to hold it. What follows is that structure: a ten-lesson course for anyone who has never written a line of LISP, guidance on writing routines you will still understand in a year, and 139 free downloads grouped by the job they actually do.

AutoLISP has changed very little in decades, and that is the practical reason an archive this old is still worth digging through. A routine written for an early release will often still load and run in a current version of AutoCAD; some of it will need a small edit, and a few files lean on commands or paths that no longer exist. The dialect is small and it lives inside the drawing rather than beside it, so you can write something useful on a Tuesday afternoon and be using it on Wednesday morning.

Work through the sections in order if you are starting from nothing. If you came only for the downloads, jump to the routine library — everything is a direct download, and most routines also have their own page here with the description the author shipped with the file.

What AutoLISP is, and where it came from

AutoLISP is a dialect of Lisp built into AutoCAD. Most of its functions deal with geometry and with the entities in the drawing, which are handed to your code as association lists — pairs of AutoCAD group codes and their values for points, radii, layers, linetypes and the rest. It can prompt the drafter for points, selection sets, numbers and strings, and it ships with a small dialog language (DCL) for building simple forms.

It arrived in AutoCAD 2.18 in January 1986, derived from an early version of David Betz’s XLISP, and was developed through to Release 12 in 1992. A third party, Basis Software, built an enhanced version called Vital-LISP with an IDE, debugger and compiler; Autodesk bought it, renamed it Visual LISP, and folded it into AutoCAD 2000. Its following was strong enough that other CAD vendors implemented it too, which is why BricsCAD and IntelliCAD will run much of what you find on this site.

One long-standing limitation has gone. For most of its life AutoLISP was absent from AutoCAD LT, which is why older references say LT cannot run it. AutoCAD LT 2024 added AutoLISP support for LSP, FAS and VLX files on Windows. The Visual LISP IDE is still not included, but the routines below will load.

For the longer version — the language’s features, its descent from XLISP and the Vital-LISP story — see AutoLISP: the language, its features and history.

Start Here: The Ten-Lesson AutoLISP Course

Ten lessons, in order, assuming no programming background at all. Lesson 1 introduces the language and what it can reach inside AutoCAD; Lesson 2 covers the environment and how code gets into a drawing session; Lesson 3 covers comments; Lesson 4, program format and the parenthesis rules that trip up everyone at the start; Lesson 5, variables; Lesson 6, numbers and the difference between an integer and a real that will otherwise cost you an afternoon; Lesson 7, program control; Lesson 8, looping; Lesson 9, data structures and the lists that AutoLISP is built out of; Lesson 10, input and output — getting points and strings from the drafter and putting entities back on the screen.

You need AutoCAD and a text editor. Nothing else, and nothing to buy. By the end of Lesson 10 you should be able to read most of the routines further down this page and write short commands of your own — the kind that set a layer, place a note, or do one repetitive thing correctly every time.

  1. Lesson 1 – Introduction to LISP programming
  2. Lesson 2 – The AutoLISP environment
  3. Lesson 3 – Comments
  4. Lesson 4 – Program format
  5. Lesson 5 – Variables
  6. Lesson 6 – Numbers
  7. Lesson 7 – Program control
  8. Lesson 8 – Looping
  9. Lesson 9 – Data structures
  10. Lesson 10 – Input and output

Writing Routines You Will Still Understand Next Year

Working code and good code are not the same thing, and the difference shows up the first time a routine leaves a variable set, kills the current layer, or dies halfway through and leaves the drawing in a state no one can undo. The techniques post here covers the habits that prevent that: declaring variables local so they do not leak into the next command, saving and restoring system variables, setting an undo mark so one Undo puts everything back, handling the escape key instead of ignoring it, and naming your commands so they do not collide with AutoCAD’s own.

There is also guidance on building a CAD LISP library — deciding where your .lsp files live, what loads automatically at startup, and how to keep a personal collection that survives a new machine or a new version. This is the step most drafters skip, and it is the one that turns a folder of downloads into a toolset you actually reach for.

  • Good AutoLISP programming techniques — error handlers, undo marks and local variables, and why routines without them come back to bite you
  • Building a CAD LISP library — how to organise your routines so they load every time

The Routine Library: 139 Free Downloads, Grouped by Job

Every routine in the archive, sorted by what it does rather than by who wrote it. Drawing routines are the biggest group at 33 — doors, windows, walls, ceiling grids, trusses, rafters, cabinets, slots, bolt heads, stairs. Then 18 editing routines, 18 multi-routine collections, 15 for blocks (counting, renaming, rescaling, forcing sub-entities to bylayer, wblocking the lot), 12 general utilities, 11 for text, 10 for steel detailing, 6 each for dimensions, survey and layers, and 4 for 3D. The steel group is worth calling out: AISC and UK structural shapes drawn to scale, welding symbols with their own toolbars, bent stair pans, and web sections you define yourself.

To use any of them: save the .lsp file somewhere permanent, then load it with APPLOAD. Add that folder to your Support File Search Path and put the file in the Startup Suite if you want it every session. Some downloads are .zip or .rar archives holding several routines and occasionally a menu or toolbar — extract them before loading, and read the header comments at the top of the file, which is where these authors put the command name and any variables you are meant to change.

The full library lives on the free AutoLISP routines page. Here is what is in it, by job:

  • Drawing geometry (33 routines) — Doors, windows, walls, stairs, trusses, ceiling grids and other things you would otherwise draw by hand every time.
  • Editing and modifying (18 routines) — Routines that change what is already on the drawing – breaking, trimming, converting and bulk property edits.
  • Block and attribute tools (15 routines) — Counting, renaming, scaling, reporting on and repairing blocks, plus attribute editing.
  • Text tools (11 routines) — Matching, changing, scaling and placing text – the jobs that eat an afternoon when done manually.
  • Layer tools (6 routines) — Setting, matching, moving and cleaning up layers.
  • Dimensions, leaders and labels (6 routines) — Leaders, labels and dimension helpers.
  • Steel and metalwork (10 routines) — Structural steel shapes, bolts, welding symbols and sheet metal – the detailing end of the library.
  • Survey and civil (6 routines) — Traverse reduction, bearings and distances, boundary labelling and slope symbols.
  • Calculators and utilities (12 routines) — Calculators, unit helpers, file and system tools.
  • 3D routines (4 routines) — The 3D corner of the library.

Collections: One Download, Dozens of Commands

Eight bundles do most of the heavy lifting: the 90 LISP collection, Master Suite, GRABBAG, HANDYLISP, Best Of Lisp, Power, MBA and llpsite. Several arrive with their own menus and toolbars already built. Alongside them sit the discipline suites — HVAC layout, mechanical drafting with drill and threaded holes, architectural routines for doors and garage doors and ceiling grids, interior elevation tools, and the LISPUT and Rock grab bags of layer, text and break utilities.

Treat these as what they are: grab bags. You get volume rather than documentation, commands overlap between bundles, and two collections loaded at once can define the same command name. Load one at a time, work through what is inside, and move the three or four that earn their place into your own library. That is a faster route to a working toolset than downloading routines one at a time.

  • 90 LISP Routines — Contains 90 different LISP routines, including Flatten, a series of layer commands and much more.
  • Architectural LISP Set — A series of architectural LISP commands such as dsda.lsp (draws a double swing, double acting door), dssa.lsp (draws a double swing, single action door), gd.lsp (draws a garage door), ceiling.lsp (draws a ceiling grid) and many other routines.
  • Best of Lisp — A “Best of Lisp” collection containing 13 routines, from one that opens Windows Explorer at the current drawing directory to one that rotates a selection to an entity of your choosing.
  • BR Tools X — A series of routines in a single LISP file, such as jt (sets the current text style to that of the selected font), mid2 (sets a point half-way between two given points), bb (breaks a line at a user’s location) and a number of others.
  • CAD Tools — A collection of bonus AutoCAD tools with three toolbars: Bonus Standard, Bonus Text Tools, and Bonus Layer Tools.
  • Drafting Tools — A single lisp file containing numerous drafting tools, including dimensioning tools, properties tools, text tools and others.
  • Grab Bag — A grab bag full of routines, with plenty of layer, text and block tools among many others.
  • Handy Lisp — Another grab bag full of routines, with far too many functions to list; download it and check them all out.
  • HVAC Suite — A full suite of lisp routines and blocks for designing and drawing HVAC systems.
  • Interior Elevation Utilities — A package of interior elevation drawing utilities designed to remove the drudge work from an arduous task.

Letting AI Write the AutoLISP: AutoCAD via MCP

The newest piece on this site connects Claude to AutoCAD through MCP, and the mechanism matters more than the novelty: it works by generating AutoLISP and running it. The AI is not driving the interface — it is writing the same language the ten lessons above teach, against the same drawing database the routines in the library manipulate.

Which is the argument for learning the language rather than skipping it. Generated code has to be read before it touches a production drawing, and reading it means knowing what a selection set is, why a variable should be local, and what happens when a routine errors out with OSMODE still overridden. The course teaches you to read it, the library gives you several hundred working examples of how experienced drafters solved the same problems, and the AI writes the next one faster than you would by hand.

  • Claude + AutoCAD via MCP: AI drafting on AutoLISP — how AI actually drives AutoCAD, and why it does it by writing AutoLISP
  • Can AI write AutoLISP? Three years on (2023–2026) — what changed, traced through the forum record
  • AI-generated AutoLISP: what actually breaks — the failure list, ordered by how far the damage travels
  • Red-penning AI AutoLISP: a line-by-line review — a generated routine marked up against the documentation, plus a twelve-point checklist
  • The AutoLISP function allowlist — all 485 function names as a free paste-in file, so the AI stops inventing them
  • AI-written AutoLISP on AutoCAD LT — what runs on the budget seat, from Autodesk’s own exclusion list
  • Does Autodesk’s own AI write AutoLISP? — what the AutoCAD 2027 Assistant actually does

Filed Under: AutoCAD Tutorials, AutoLISP Routines

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in