Last updated July 28, 2026
A small routine that draws a door in plan with its trim and a knob. You give it the opening size, the trim width and the knob radius, pick the lower left corner, and it draws the lot.
It is by Reid Reagan, dated 25 January 1995 — a companion to the 2D window routine on this site, which comes from the same era and works the same way.
Check it loads before you plan around it
An honest note, and the first thing to deal with.
The line that defines the command has a space in the middle of the command name — it reads C: 2dDOOR rather than C:2DDOOR. In AutoLISP the C: prefix and the command name have to be joined into one word; that space makes them two separate things, and a function definition written that way is not valid.
We have not run the file, so we will not tell you flatly that it fails — some readers are more forgiving than others. But load it in a scratch drawing and confirm the command actually answers before you rely on it. If it does not, the fix is to delete one space.
That is worth knowing generally: a routine that appears to load without complaint but whose command is not recognised afterwards usually has something wrong with the defun line rather than with the body of the code.
What it asks for
Four dimensions and a point, in this order: the horizontal distance, the vertical distance, the trim width, and the door knob radius, then the lower left corner of the opening.
Note there are no defaults offered on any of them, unlike its window counterpart, which suggests these two were written by different hands even though they were collected together. It also saves the current layer before it starts, so it can put things back.
Expect imperial thinking in the numbers you type — this is mid-1990s American student-era work, and the window routine it pairs with offers defaults of 56 and 48, which are inches rather than millimetres.
Command reference
The command as written is 2DDOOR, subject to the caveat above about how the definition line is formed.
Note that a command name starting with a digit is legal in AutoLISP but unusual, and some people find it awkward to type. If you are editing the file to fix the space anyway, renaming it to something alphabetic costs nothing.
How to load it
Unzip 2DDOOR.zip and load 2DDOOR.LSP with APPLOAD. No support files. Our AutoLISP guide covers loading.
Step-by-step usage
- Load the file and confirm the command is recognised before going further.
- Type the command.
- Give the horizontal distance, then the vertical distance — the opening size.
- Give the trim width and the door knob radius.
- Pick the lower left corner of the opening. The door is drawn from there.
Draw one at a known size in a scratch drawing and dimension it before using it on a plan, so you can see how the trim width relates to the opening you nominated.
Compatibility notes
January 1995, so written-for rather than tested-on. Beyond the defun line it is straightforward point arithmetic with AutoCAD’s own drawing commands, which is the kind of code that survives.
Plain AutoLISP with no dialog boxes and no Express Tools calls, so nothing requires the full product; LT users on LT 2024 or later, the release that brought AutoLISP to LT, face the same loading question as everyone else. See what runs on AutoCAD LT.
If you want a door routine that is known to be sound, the ArchLisp collection has four covering different swing types, and there is a standalone door routine here as well.
Download
| Name: | 2D Door |
| Description: | A small program that draws a 2D door on your floor plan. |
| Type: | AutoCAD AutoLISP Routine |
| Author: | Reid Reagan |
| File Size: | 1 Kb |
| Cost: | Free |
| Worked on: | AutoCAD |
| Download File: | 2DDOOR.zip |
Related routines
- 2D Window — its companion, collected at the same time.
- ArchLisp — four door routines by swing type.
- Building collection — single and double doors, plus windows.