• 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

SKEWBOX LISP: Draw a Rectangle at Any Rotation

August 3, 2026

The standard RECTANGLE command only draws rectangles aligned to the current UCS. To get one at an angle you have to draw it square and then rotate it, which means knowing the angle in advance. SKEWBOX takes three points instead.

What SkewBox does

The first two points define one side, so its direction sets the rotation. The third sets the depth, measured perpendicular to that side.

Snap the first two points to existing geometry and the rectangle aligns to it exactly — no angle to look up, no reference rotation, no rounding error from typing an angle that was never quite 37.2°.

SKEWBOX is three picks with no preview. SKEWBOXLIVE shows the rectangle updating as you move the third point, with full object snap support.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type SKEWBOX, or SKEWBOXLIVE for a preview.
  3. Pick two points along the side you want the rectangle aligned to.
  4. Pick the third point to set the depth.
  5. In the live version you can type a number for an exact depth, @x,y for a relative coordinate, or an object snap name abbreviated as far as you like. F3 toggles running snaps.

How it works

A temporary coordinate system is built whose Z axis runs along the first side. Working in that system, the depth becomes a simple change in one ordinate.

That is what allows the same arithmetic to serve every rotation and every UCS without special cases. The alternative — computing perpendicular offsets in world coordinates and handling each quadrant — is where routines like this usually go wrong, typically at exactly 90° or across a UCS boundary.

Works correctly in any UCS and any view.

Notes and limits

  • The first two picks set the rotation. Snap them to the geometry you want to align with.
  • The third pick sets depth only, measured perpendicular — its position along the side is ignored.
  • SKEWBOXLIVE supports typed input for an exact depth, which the plain version does not.
  • One undo group per rectangle.

Download and details

NameSkewBox — draw a rectangle from three picked points, at any rotation
DownloadSkewBox.lsp — 25.0 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsSKEWBOX, SKEWBOXLIVE
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size25.0 KB, 556 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

  • SHRINKWRAP LISP — outline objects rather than draw a box around them
  • TEXTFRAME LISP — boxes drawn to fit text
  • 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