• 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

ROOFPITCH LISP: Draw a Roof Pitch Triangle in AutoCAD

August 6, 2026

ROOFPITCH draws the little right-angled triangle that marks a roof slope, with the rise and the run written on it — 4 over 12, 1 over 40, whatever the roof is. The triangle can face any of the four ways, so it sits correctly whichever slope it is labelling.

What RoofPitch does

It will also read the slope off the drawing. Pick two points along the roof line and it works out the rise for a run of 12, which saves doing it in your head and getting it wrong.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type ROOFPITCH.
  3. Give the rise and run, or pick two points along the roof to read them off.
  4. Choose the direction the triangle faces.
  5. Pick where it goes.

How it works

The triangle is drawn directly rather than inserted from a block, and the direction is an option rather than four separate commands. Four near-identical files, one per corner, each needing its own block already in the drawing, is four things to install and four to lose.

Rise and run take decimals. Reading them as integers means a 2.5 in 12 pitch cannot be entered at all — which rules out a good proportion of real roofs.

Pressing Enter at a prompt does the right thing. Testing for nil and then calling (command) with no arguments cancels whatever command is running — it does not leave the routine. The routine carries on with a rise of nil, which then goes to INSERT as an attribute value.

Notes and limits

  • Rise and run may be decimal.
  • ATTDIA, ATTMODE and ATTREQ are left as you had them.
  • Nothing has to be installed — the triangle is drawn, not inserted.
  • One undo group covers the symbol.

Download and details

NameRoofPitch — draw a roof pitch triangle, facing any way
DownloadRoofPitch.lsp — 9.3 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandROOFPITCH
Requiresnothing beyond a CAD platform with AutoLISP.
Source size9.3 KB, 222 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

  • PITCHMARK LISP — the same symbol sized from your dimension variables
  • HOUSESHELL LISP — the roof this labels
  • 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