• 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

DOOR.LSP: Two-Pick Door AutoLISP Routine for AutoCAD

September 18, 2020

Last updated July 27, 2026

DOOR.LSP is a compact AutoLISP routine written by Ben Olasov of Graphic Systems, Inc. in 1988 and 1989. Its job is exactly what the header calls it: a two-pick door command. You pick a hinge point and a swing point on one face of a wall drawn as parallel lines, and the routine cuts the opening, draws both jambs, the open leaf and the swing arc, all on the wall’s own layer.

The download is a small time capsule as well as a working tool. Alongside DOOR.LSP the zip carries two BBS-era text files: DESC.SDI, a one-line description reading “Two pick door command”, and BBS.ADD, a notice from The Baud Room, a Melbourne bulletin board that specialised in CAD and computer graphics, ran a shareware library and carried a Fidonet address. Routines like this circulated that way long before the web, and this one still loads the same way any LISP file does.

What it does in practice

The routine expects a wall drawn as two parallel LINE entities on the same layer. Reading through the code, a run works like this:

  • Your two picks are snapped to the nearest entity (osnap NEAR), so you only need to click close to the wall line, not exactly on it. The distance between the picks becomes the door width.
  • It then hunts for the opposite face of the wall with a crossing window 12 drawing units each side of the hinge point, discarding anything that is not a LINE, not on the same layer as the line you picked, or not parallel to it within about one degree.
  • With both faces found, it runs BREAK on each wall line across the opening, then draws the two jamb lines, the leaf at the door width, and the swing arc from the swing point to the tip of the leaf.
  • It switches to the wall’s layer to draw, then restores your current layer, and it saves and restores CMDECHO, COORDS, OSMODE and BLIPMODE around the whole operation.

If the first pick lands on something that is not a line, it prints “Wall entities must be lines.” In that case, or whenever it cannot build a usable selection, it also reports “door: invalid selection set” and stops without drawing anything.

Command reference

The file defines a single command, DOOR. It also loads a handful of helper functions with plain names (SS2ENAMLIST, PARALLEL, MODES, MODER, LINE? and a fuzzy-equality test) into the global namespace, which is worth knowing if you run other routines that happen to use the same names.

How to load it

Extract DOOR.LSP from the zip, then load it with APPLOAD (Tools, Load Application). Add it to the Startup Suite in the same dialog if you want it available every session. While it loads you will see a small “Please wait- loading..” spinner, then the message “2 pick door command C:DOOR loaded. Type DOOR to begin.” For background on loading LISP files and where AutoLISP fits into AutoCAD, see our AutoLISP guide.

Step-by-step usage

  • Draw the wall as two parallel LINE entities on the same layer. Polylines will not work; the routine checks the entity type.
  • Type DOOR at the command line.
  • At “Hinge pt: ” pick the point on the near wall face where the hinge jamb should sit.
  • At “Swing pt: ” pick a second point along the same wall face. The distance between the two picks sets the door width.
  • The routine finds the opposite face, breaks both wall lines, and draws the jambs, leaf and swing arc. Your layer and drafting settings come back as they were.

Compatibility notes

The file header dates the code to 1988 and 1989, and the gc and vmon housekeeping calls at the top are pure 1980s AutoLISP, so treat this as written for the AutoCAD of that era rather than tested on anything current. The spec table below simply says it worked on AutoCAD, with no version given.

One practical catch: the search window for the opposite wall face is hard-coded at 12 drawing units either side of the hinge point, which suits inch-based drawings. On a metric drawing where the wall is thicker than 12 units, the far face falls outside the window and the routine will stop without drawing. If you are comfortable editing LISP, the four 12.0 values in the SSGET call are the place to look.

On the plus side, there are no DCL dialog boxes and no Express Tools (acet-) calls here, just core AutoLISP driving standard BREAK, LINE, ARC and LAYER commands. So nothing in it structurally requires full AutoCAD, and since AutoCAD LT gained AutoLISP in LT 2024 it is a reasonable candidate to try there too; see what runs on AutoCAD LT. Given its age, run it on a copy of your drawing first.

Download

Name: DOOR
Description: Draws a 2D door.
Type: AutoCAD AutoLISP Routine
Author: Ben Olasov
File Size: 3 Kb
Cost: Free
Worked on: AutoCAD
Download File: DOOR.zip

Related routines

  • Draw Architectural Walls LISP routine – set out the walls first, then cut the doors in.
  • Best of LISP collection – a bundled set of free routines if you want more than one at a time.
  • HVAC Suite LISP routine – more building-services drafting helpers from the same library.

References

  • AutoLISP programming guide
  • Free LISP routines library
  • AutoLISP on AutoCAD LT

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