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
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
PLAINSPEAK. - Type an instruction in plain words.
- 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,BLIPMODEand 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
| Name | PlainSpeak — type instructions in ordinary English |
| Download | PlainSpeak.lsp — 14.3 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | PLAINSPEAK |
| Requires | nothing beyond a CAD platform with AutoLISP. |
| Source size | 14.3 KB, 347 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| Compatibility | AutoCAD (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. |
| Author | YZ, August 2026 |
| Licence | Free 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