AutoCAD – Drawings

An AutoCAD LISP library: 45 commands, loaded once and ready

An AutoCAD LISP library of 12 files and 45 commands from the Institute, with the source code published and step-by-step loading. Free, no password, no ads.

  • TS. Đỗ Quốc Hoàng
  • 10 min read
The Load/Unload Applications dialog after loading all twelve files, the status line reading Successfully loaded 12 files Photo: AutoCAD 2027

You search for a LISP collection, download a 20 MB password-protected archive, and unpack three hundred .lsp files of unknown origin. Load them and half the command names collide, one command does another's job, and there is no index telling you what any of it does.

An AutoCAD LISP library is worth having only if you can read it. This one holds 12 files and 45 commands, each with its own tutorial article and the full source code printed in the article. It downloads directly, with no password and no intermediate page. For the whole discipline of producing a drawing set, the Institute runs an AutoCAD course for construction.

The set: 12 files, 45 commands, 43 KB

The whole thing weighs 43 KB, less than one screenshot. Each file stands alone: load a file and you get its commands, and no file depends on any other.

FileCommandsWhat it does
dt-iic.lspTDT TDTX TDTP TDTPX GDT GDTXSums the area of closed shapes, including overlap handling
stt-iic.lspSTT STTT STTD + 3 fallback namesAutomatic sequential numbering
in-iic.lspINHL INHLC INHL1 + 3 fallback namesBatch plotting by title block
tkt-iic.lspTKT TKTX + 2 fallback namesRebar schedules and quantity tables
xtd-iic.lspXTD XTDCSVLabels point coordinates and exports them
blk-iic.lspBKD BKM BKT BKPCounts, recolours, renames and explodes blocks in bulk
sc1-iic.lspSC1 SC1X + 2 fallback namesOne-directional scale along a single axis
txt-iic.lspTXC TXN TXL TXHAdds numbers inside text, aligns, changes text height
dcd-iic.lspTCD TCDT TCDLTotal length of selected objects, split by layer
ntd-iic.lspNTD NTDP NTDKReads coordinates from a CSV into the drawing
dnh-iic.lspDNH DNHPWrites a continuous dimension chain in one pass
cd-iic.lspCDTrims dimension extension lines to one level

Load all twelve into a fresh drawing and all 45 commands are there, with none dropped.

One detail worth stating: none of the 45 names clashes with an AutoCAD 2027 command, nor with any of the 424 aliases in acad.pgp. Naming a routine after an existing alias costs you a command you already had — DT is the alias for TEXT, AA for AREA, AR for ARRAY, so all three were ruled out at the start.

Note for English-speaking users: command prompts in most of these files are in Vietnamese. Five of the twelve also ship an English build, named with an -en suffix inside the archive.

Loading a lisp file: three steps with the dialogs

Step 1 — unzip somewhere permanent.

Unzip the folder somewhere that will stay put, say C:\CAD\lisp-iic. AutoCAD remembers the path only; it copies nothing, so deleting or renaming the folder takes the routines with it.

Step 2 — type APPLOAD and press Enter.

The Load/Unload Applications dialog opens. Point it at the folder you just unzipped. Leave Files of type on AutoCAD Apps, which filters the list down to .lsp files.

Step 3 — select them all and click Load.

Click the first file, press Ctrl+A to take all twelve, then click Load. The status line at the bottom reports how many files went in.

All twelve files selected and loaded, with the status line reading Successfully loaded 12 files Photo: AutoCAD 2027

That is enough to start using the commands. But a routine loaded this way lives only until AutoCAD closes.

The autocad startup suite: load them every session

This is the step most LISP download pages skip, and it decides whether you keep using a set or quietly abandon it.

Still in APPLOAD, the Startup Suite panel sits at the lower right. Click Contents…, then Add… in the dialog that opens, point at the LISP folder again, select all twelve files and click Open.

After adding, the Startup Suite lists all twelve files with their paths, and the status line reads 12 files added to the Startup Suite Photo: AutoCAD 2027

From the next session on, the 45 commands are simply there. The list is stored with your user profile rather than in the drawing, so it follows you across every drawing on that machine.

Lisp will not load in autocad: the two real causes

When a lisp will not load in autocad, it is almost always one of two things, and neither is a corrupt file.

First — AutoCAD is blocking it on security grounds. The line File Loading - Security Concern appears. That is the SECURELOAD variable. Autodesk's page on the SECURELOAD variable sets out three levels:

SECURELOADAutodesk's wording
0"Loads executable files from any location without displaying a warning. This option maintains legacy behavior, but is not recommended."
1"Loads executable files only if their location is in the trusted locations specified in the TRUSTEDPATHS system variable. Displays a warning during load requests from executable files in other locations."
2"Allows executable files to be loaded only if their location is in the trusted locations specified in the TRUSTEDPATHS system variable."

The default is 1. The right fix is not to drop it to 0 but to register the folder: type OPTIONS, open the Files tab, find Trusted Locations, click Add… and point at C:\CAD\lisp-iic. Files in that folder then load normally while anything elsewhere is still stopped.

Second — the file was saved in the wrong encoding. A LISP file containing Vietnamese text must be saved as UTF-8. Open it in Notepad and save it as ANSI and every prompt breaks; if a quotation mark shifts in the process, AutoCAD skips the whole file after one red line that scrolls past.

Download autocad lisp collections: three things to check first

Search for a download autocad lisp pack and dozens come back, most of them bundles assembled from many sources over many years. Three things are worth checking before you let one run on your machine.

First, how many command names collide. Large bundles routinely hold 300 files or more, and when several files declare the same command name the last one loaded wins. One widely circulated Vietnamese bundle holds 312 files declaring 2,230 command names, of which 480 names are claimed by two or more files — the name CD alone is claimed by 18 files. What CD does depends on load order that day.

Second, whether the source is readable. A .lsp file is plain text; open it in Notepad and you can read it. A .fas or .vlx file is compiled and cannot be read. A compiled file runs with AutoCAD's full rights on your machine while you have no idea what it does.

Third, where the files came from. Most "collected" bundles name no author and carry no licence. Using them on work you issue to a client is a different proposition from using them for practice.

The Institute's set answers all three: no two files declare the same command name, everything is readable .lsp, and the source is printed in the tutorial articles — for example the dimension-trimming routine or the coordinate export routine.

The trap nobody writes about: two files overwriting each other's helpers

Clashing command names are widely discussed. There is a more damaging kind of clash that is not: clashing helper function names.

AutoLISP has no per-file scope. Every function lands in one shared namespace. If two files both define a helper called iic-ghi-nhan, one taking 2 arguments and the other 5, the file loaded second overwrites the first. A command from the other file then calls that helper with the old argument count, and AutoCAD raises an error somewhere unrelated to what you were doing.

What makes it hard to catch is that nothing shows at load time. The dialog still reports success and every command name is still present. The fault surfaces only when you run the one unlucky command.

This set closes the hole: every file prefixes all of its own helpers — iic-xtd-, iic-tkt-, iic-dt- and so on. No two files in the set can tread on one another, whatever order they load in.

When you mix this set with useful autocad lisp routines collected elsewhere, this is worth checking too: open the file in Notepad and look at the (defun lines with no c: after them. Those are helpers. The more generic the name, the likelier the clash.

Pick by the job in front of you

There is no need to load everything if you only want a few commands.

What you are doingLoad
Taking off slab, wall and roof quantitiesdt-iic.lsp + dcd-iic.lsp
Finishing a set for plottingcd-iic.lsp + dnh-iic.lsp + in-iic.lsp
Infrastructure and earthworksxtd-iic.lsp + ntd-iic.lsp + stt-iic.lsp
Structural drawingstkt-iic.lsp + dt-iic.lsp
Cleaning up a drawing from elsewhereblk-iic.lsp + txt-iic.lsp

Anyone taking free autocad lisp routines for the first time should start with two files and add more once those are familiar. Loading 45 commands you cannot name is the same as loading none.

Three things often repeated that are not true

Often repeatedWhat holds on the 2027 release
LISP files must sit inside the AutoCAD install folderAnywhere works, as long as the folder is a Trusted Location
Save the drawing after loading and the routines stayRoutines are not stored in the drawing; use the Startup Suite
The more files in the bundle the betterMore files means more command names fighting each other

Frequently asked questions

Does an AutoCAD LISP library like this work on older releases?

The code is standard AutoLISP plus ActiveX, so it runs on any release with Visual LISP. This set is checked on AutoCAD 2027.

Is there a charge, or a form to fill in?

No. It downloads straight from the page, with no password and no link shortener.

I loaded it but the command comes back as Unknown command.

Routines live only for the session. Closing AutoCAD clears them unless they are in the Startup Suite. It is also worth checking the dialog reported all twelve files.

I already have another LISP set. Can I load both?

Yes, provided the command names do not overlap. Where they do, the set loaded second wins. The fallback names ending in IIC exist for exactly this case.

Can I edit the routines for our office conventions?

Open them in Notepad and edit away, remembering to save as UTF-8. The source is printed in each tutorial article with the reasoning explained section by section.

Which commands are slow on a large drawing?

The ones that sweep the whole drawing — TDTX, GDTX, STTD — have to walk every object. On a large file, select the area first and use the variant without the X.

About the author

TS. Đỗ Quốc Hoàng — Vice Director of the Institute of Information Technology in Civil Engineering, Hanoi University of Civil Engineering, and a specialist in software development for construction