• 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

PLAINSPEAK LISP: Drive AutoCAD by Typing English

August 6, 2026

Type what you want in ordinary words and watch AutoCAD do it: draw three circles, hide the lines, count the circles, that will do, quit.

What PlainSpeak does

It is a demonstration rather than a tool. But the thing it demonstrates is worth understanding, because the same machinery is useful anywhere a routine has to make sense of text it did not write — a configuration file, a note somebody typed, a command line with options in any order.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type PLAINSPEAK.
  3. Type an instruction in plain words.
  4. Say quit when you have had enough.

How it works

The sentence is broken into words and tested against a set of patterns. A pattern is a list of words with three wildcards mixed in:

$ONE$    matches any single word, and throws it away
$MANY$   matches any run of one or more words, and throws them away
$SAVE$   matches any single word and KEEPS it

So ("DRAW" "$SAVE$" "$SAVE$") matches draw three circles and hands back ("THREE" "CIRCLES"), while ("$MANY$" "QUIT") matches that will do quit and hands back nothing.

The matcher is recursive, and that is the elegant part. $MANY$ works by trying to match the rest of the pattern here, and if that fails, swallowing one more word and trying again. Six lines of code for something that reads like it should be much harder.

Captures come back as a flat list, in order. Building them by nesting each capture inside the last means the caller has to dig them out with (caadr ext), which works for two and becomes unreadable at three.

Notes and limits

  • The vocabulary reaches twenty, and any actual numeral is read directly — so draw 12 circles works.
  • Nothing is left behind. No layers are created speculatively; CMDECHO, BLIPMODE and the current layer are all restored.
  • It is a demonstration. The pattern matcher is the part worth borrowing.
  • One undo group covers a session.

Download and details

NamePlainSpeak — type instructions in ordinary English
DownloadPlainSpeak.lsp — 14.3 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandPLAINSPEAK
Requiresnothing beyond a CAD platform with AutoLISP.
Source size14.3 KB, 347 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoThe whole operation is wrapped in a single undo group, so one U reverses all of it.
CompatibilityAutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer.
AuthorYZ, August 2026
LicenceFree to use, supplied “as is” with no warranty.

References

  • CMDSCOUT LISP — another routine that parses text it did not write
  • AI and AutoLISP — where natural-language CAD went next
  • More free AutoLISP routines on this site
  • Wisey’s Steel Shapes — free structural steel section drawing program

Filed Under: 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