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
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
ROOFPITCH. - Give the rise and run, or pick two points along the roof to read them off.
- Choose the direction the triangle faces.
- 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,ATTMODEandATTREQare 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
| Name | RoofPitch — draw a roof pitch triangle, facing any way |
| Download | RoofPitch.lsp — 9.3 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | ROOFPITCH |
| Requires | nothing beyond a CAD platform with AutoLISP. |
| Source size | 9.3 KB, 222 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
- 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