• 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

RAFTER LISP: Parametric Rafters and Roof Trusses for AutoCAD

September 19, 2020

Last updated July 28, 2026

Two routines in one file: RAFTER draws a single rafter in elevation, and RTRUSS draws a roof truss built from a pair of them. Both are parametric — you give the member size and the rise, and the geometry follows.

It is by Bob Thomas of Thomas Enterprises in San Rafael, and it belongs with his floor truss routine and cabinet elevations — the three are built the same way and licensed the same way.

Two commands, not one

  • RAFTER — a single rafter. It remembers the rafter width, the rafter height and the rise.
  • RTRUSS — a roof truss, described in the header as a double rafter. It remembers the same width and height, plus an upper rise, which tells you the truss can be drawn with a break in the pitch rather than one straight slope.

Each keeps its own defaults, so switching between the two does not lose the values you set for the other. That is a small thing that matters when you are working through a roof plan with both a rafter detail and a truss detail on it.

Both files must stay together

The archive holds RAFTERS.LSP and RAFTERS.DWG. The author’s licence is the same as for his other routines: freely copyable provided the two files stay together and the header stays intact, so people know what the program does and he gets the credit.

The drawing file is part of the program rather than an example, so extract both into one folder on your support file search path.

Named defaults, deliberately global

As with the rest of this author’s work, everything is local except the values that carry your last answers forward, and he names them in the header so you can check for collisions: rw and rh for rafter width and height, rise for the rafter’s rise, and rise1 for the truss’s upper rise.

Note that rw and rh are shared between the two commands, which is why setting up your member size once serves both. If you have your own variables by those names, rename his — he invites it.

Expect imperial defaults

The same caveat as the companion routines. The author is American and his cabinet routine states its defaults in inches, so expect the same starting values here. Typing metric numbers produces metric geometry — what you lose is useful defaults, not correctness. Editing them to Australian timber sizes is a small job and worth doing if you will use the routines often.

How to load it

Unzip Rafter.zip, put both files in one folder on the support file search path, then load RAFTERS.LSP with APPLOAD. Both commands come from the one file. Our AutoLISP guide covers loading and the search path.

Step-by-step usage

  1. Type RAFTER for a single member or RTRUSS for a truss.
  2. Give the rafter width and height — the section size of the timber.
  3. Give the rise. For RTRUSS you are also asked for the upper rise.
  4. Place the result. Run either command again and your values are offered back.

Draw one and dimension it before using the output on a real drawing, so you are certain the numbers you typed mean what you assumed.

Compatibility notes

The companion routines from this author reference Release 10, placing the family around 1990. Written-for rather than tested-on. It is parametric geometry from standard functions, which tends to survive, and a DWG of that age still opens in current AutoCAD.

Plain AutoLISP with no dialog boxes 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. See what runs on AutoCAD LT.

Download

Name: RAFTER
Description: This file contains two parametric programs that create
a rafter and a roof truss (double rafter).
Type: AutoCAD AutoLISP Routine
Author: Bob Thomas
File Size: 8 Kb
Cost: Free
Worked on: AutoCAD
Download File: Rafter.zip

Related routines

  • TRUSS — floor trusses from the same author.
  • CABINET — his parametric cabinet elevations.
  • WALLS — the walls the roof sits on.

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