• 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

BL LISP: Building Lines on a Rotated Snap Angle

September 18, 2020

Last updated July 28, 2026

BL draws building lines on a skewed grid. You pick two points along the direction the building runs, the snap grid rotates to match, ortho comes on, and from then on your lines go square to the building instead of square to the screen.

It is by Lawrence Lieberman of Hogan, Schoch & Associates in Sebastopol, California — the same author as BANK — version 1.0, dated 9 February 1991.

The idea is worth more than the routine

Anyone who has drawn a building set at 23 degrees to north knows the problem. Ortho is the fastest way to draw, and on a skewed building ortho is useless, so you turn it off and fight every line with object snaps and typed angles.

The fix is to rotate the snap grid rather than the drawing. Ortho follows the snap angle, not the world axes, so once the grid is aligned to the building, ortho is square to the building too. Everything that felt slow goes back to being fast, and the geometry is still stored at its true angle — nothing has been rotated, only the way you are working over the top of it.

That is the whole trick, and it survives the routine. Even if you never load this file, the technique is worth having.

Command reference

  • BL — asks whether to re-use the current snap angle or set a new one, then starts a polyline.
  • ZERO — sets the snap angle back to 0 degrees.

Two commands, not one. The listing below describes only BL; ZERO exists and is announced by a prompt, which is easy to miss and worth knowing before you find yourself with a permanently crooked crosshair.

Both names are short and generic. BL especially is the sort of two-letter name people assign to their own aliases, so check it is free before you load this alongside a personal toolset.

What the code actually does

The alignment is done by handing two picked points to the SNAP command’s Rotate option, which sets both the snap origin and the snap angle in one move. Ortho is then forced on, and you are told to type ZERO when you want the grid straight again.

Two things in the file are worth knowing before you rely on it, and neither is obvious from running it once.

Ortho is saved and never restored

The first line of BL reads the current ortho setting into a variable. Nothing ever reads it back. The intent is plain enough — put the drawing back the way it was — but the restoring half was never written, so BL leaves ortho on when it finishes, and so does ZERO.

That variable is also not in the routine’s list of locals, so it is left behind in the drawing session rather than cleaned up. Harmless in itself, but it is the fingerprint of an unfinished intention rather than a decision.

The re-use path has no points to re-use

Answer Y at the prompt and you pick a base point and an alignment point, the grid rotates, and the polyline starts at your base point and runs to your alignment point. That path works.

Answer anything else and the two points are nil. They are declared local to BL and only ever assigned inside the routine that does the picking, so on the re-use path nothing has set them. The polyline still starts — but not where the code means it to, and you will be picking the start point yourself.

The snap angle does survive between runs, because it is a system variable and stays where the last run put it. So the re-use path does the useful part. It is only the automatic start point that is missing.

If the snap rotation line fails

The SNAP command’s option list has changed over the years, and the Rotate option is the part most likely to have moved out from under this file. Test that step first — pick your two points and see whether the crosshairs actually turn.

If they do not, the same job is two system variables, which will not go anywhere:

(setvar "snapbase" p1)
(setvar "snapang" (angle p1 p2))

SNAPBASE moves the grid origin to your first point; SNAPANG rotates it. The angle function returns radians and SNAPANG expects radians, so no conversion is needed. Drop those two lines in where the SNAP call is and the routine does the same thing by a route that has not changed since 1991.

The modern alternative is a rotated UCS, which does the same for ortho and also brings text, hatch and dimensions along with it. For a quick run of building lines the snap angle is less to undo.

How to load it

Unzip BL1.zip and load it with APPLOAD. Note that the file inside is named BL.LSP, not BL1.LSP — the download name and the file name differ, which matters if you are searching your support folder for it later. No support files. Our AutoLISP guide covers loading.

Step-by-step usage

  1. Type BL.
  2. Answer Y to set a new angle. Any other key re-uses the angle already set.
  3. Pick a base point on the building line, then a second point along it. The crosshairs turn to match.
  4. Keep picking points. Ortho is on and now runs with the building.
  5. Type ZERO when you want the grid square to the world again.
  6. Turn ortho off yourself if you want it off. The routine will not.

The two points in step 3 do not have to be on the building line itself. Any two points along the right direction will do — a grid line, a boundary, the edge of a survey feature.

Compatibility notes

February 1991, so written-for rather than tested-on. It is thirty lines of plain AutoLISP with no dialog boxes and no Express Tools calls, so nothing here 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.

It draws a polyline and changes three system variables. Nothing is deleted or modified, so the worst case is an unwanted polyline and a crooked snap grid — one undo and one ZERO.

Download

Name: BL
Description: Used to create building lines, etc. Works in polyline mode.
Allows re-use or reset of snapangle, and forces orthomode.
Type: AutoCAD AutoLISP Routine
Author: Lawrence Lieberman
File Size: 1 Kb
Cost: Free
Worked on: AutoCAD
Download File: BL1.zip

Related routines

  • BANK — by the same author, from the same office.
  • Draw Architectural Walls — the walls that go on the building lines.
  • WALLS — another take on the same job.

References

  • AutoLISP: the complete guide
  • Free LISP routines library
  • AutoLISP Lesson 5: Variables
  • 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