• 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

Roof Pitch LISP: Place Rise-over-Run Symbols in AutoCAD

September 19, 2020

Last updated July 28, 2026

Four routines that place a roof pitch symbol — the little triangle with the rise over the run written on it — on a section or elevation. There is one command for each orientation, so the triangle points the right way whichever side of the roof you are annotating.

It is by Donald B. Smith, P.E., dated 19 May 2003.

It asks for rise and run, not span

The listing below says to enter the rise, the run and the span. The code asks for two values, not three: rise, then run, then where to put it. There is no span prompt.

That is worth knowing before you go looking for a prompt that is not coming. It is also the more sensible design — a pitch symbol expresses a ratio, and the span of the roof has nothing to do with it.

Four commands, one per corner

  • SLOPEUL — upper left.
  • SLOPEUR — upper right.
  • SLOPELL — lower left.
  • SLOPELR — lower right.

Each is a near-identical file that inserts its own matching block. That is why the download contains four drawings alongside the four routines — the symbols themselves are DWG blocks with two attributes on them, and the LISP simply asks you for the numbers and fills them in.

Pick the command by which way the roof slopes on your drawing. A roof rising to the right wants one of the right-hand symbols; the upper and lower pair let you place it above or below the roof line without the triangle reading upside down.

The blocks must be findable

This is the thing that will stop it working. The routines insert blocks by name — lleft, lright, uleft and uright — and those blocks are the four DWG files in the archive. If AutoCAD cannot find them on its support file search path, the insert fails and you get nothing.

Extract all eight files into one folder and put that folder on the search path. The LISP files alone are useless.

Each routine also sets three attribute system variables before inserting, so the values you typed go straight into the block rather than opening a dialog. It does not restore them afterwards, which is worth knowing if you had them set differently — ATTDIA in particular controls whether attribute entry uses a dialog, and it will be left switched off.

How to load it

Unzip Roof_Pitch.zip, put all eight files in one folder on the support file search path, then load the four .lsp files with APPLOAD. Our AutoLISP guide covers loading and the search path.

Step-by-step usage

  1. Work out which orientation you need and type that command — SLOPEUR for a roof rising to the right with the symbol above the line, and so on.
  2. At “Value for Rise:” type the rise as a whole number.
  3. At “Value for Run:” type the run, again as a whole number.
  4. At “Insertion Point:” pick where the symbol goes.

Both value prompts take whole numbers only, so a pitch expressed as a decimal needs converting to a ratio first — which is how pitch symbols are normally written anyway.

Compatibility notes

2003, which makes it one of the more recent items in this library. It sets system variables and inserts a block, neither of which has changed, so it stands a good chance on a current release.

Plain AutoLISP with no dialog boxes of its own 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, should be able to run it, provided the blocks are on the path. See what runs on AutoCAD LT. Note that the symbol geometry is whatever is in those four drawings, so if the style does not match your office standard, edit the blocks rather than the code.

Download

Name: Roof Pitch
Description: A helpful tool for drawing roof pitches.
Simply enter the rise, the run and the span and the program does the rest.
Type: AutoCAD AutoLISP Routine
Author: D Smith
File Size: 20 Kb
Cost: Free
Worked on: AutoCAD
Download File: Roof Pitch.zip

Related routines

  • RAFTER — draw the rafters the pitch describes.
  • BATT — insulation for the same roof section.
  • TRUSS — floor trusses from the same kind of parametric approach.

References

  • AutoLISP: the complete 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