• 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

WALLRUN LISP: Multi-Line Walls With Doors and Windows

August 6, 2026

A complete wall system: draw a run of wall as any number of parallel lines from a named wall type, with corners cleaned automatically, then cut openings into it for doors, windows and relites.

What WallRun does

WALLRUN     draw a run of wall, closing back on itself if you want
WALLTYPE    list, load and create wall types
WALLOPEN    cut a plain opening
WALLDOOR    cut an opening and draw a door leaf and swing
WALLWIN     cut an opening and draw glass and a ledge
WALLRELITE  cut an opening and draw glass only

A wall type is a list of the lines that make up the wall, each with its own layer, linetype, colour and offset from the run line:

*STUD-100
(("WALL" "CONTINUOUS" "BYLAYER"  50.0)
 ("WALL" "CONTINUOUS" "BYLAYER" -50.0))

That is a 100 wide wall as two lines either side of the centreline. Add more entries for a cavity wall, an insulation line, a finish line — as many as the drawing needs. Any of layer, linetype or colour may be nil, meaning “leave whatever is current”.

Types live in WallRun.wal beside the routine. Add your office’s standard build-ups there once and they are available in every drawing.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type WALLTYPE to pick or create a wall type.
  3. Type WALLRUN, give a from-point and a to-point, and say which side of that line the wall sits on.
  4. Type WALLDOOR, WALLWIN, WALLRELITE or WALLOPEN to cut into it.

How it works

Every offset is measured from the run line, so a wall type can describe a build-up that is not symmetrical — a cavity wall set out from its structural leaf, say — and it stays the right way round.

Each new segment is filleted to the one before it, line by matching line, at zero radius. That is what cleans the corners: line 1 of the new segment meets line 1 of the old, line 2 meets line 2, so a five-line wall turns a corner correctly rather than leaving twenty loose ends. Close the run and it fillets back onto the first segment too.

All four opening commands share one engine. Touch a point on one face of the wall; optionally give a distance from the nearest end, to set the opening out from a corner rather than by eye; touch the opposite face; give the opening width and pick which way along the wall it runs.

That third pick measures the wall, so the openings work on any wall thickness without being told it.

Whether each face is removed between the jambs or merely split there depends on the command: a door removes both faces, a window keeps one so the ledge can sit against it.

Notes and limits

  • Wall types live in WallRun.wal, beside the routine.
  • Any number of lines per wall, at any offsets.
  • Corners clean themselves as the run is drawn.
  • Openings measure the wall rather than being told its thickness.
  • One undo group per command.

Download and details

NameWallRun — a complete wall system: runs, wall types, doors and windows
DownloadWallRun.lsp — 29.7 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsWALLDOOR, WALLOPEN, WALLRELITE, WALLRUN, WALLTYPE, WALLWIN
Requiresnothing beyond a CAD platform with AutoLISP.
Source size29.7 KB, 708 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

  • WALLCLEAN LISP — tidying junctions drawn some other way
  • WINDOWPLAN LISP — a fuller double-hung window in plan and elevation
  • HOUSESHELL LISP — the shell the walls go inside
  • 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