Last updated July 28, 2026
Rot2ent rotates objects so that one edge of them lines up with another object. Instead of working out an angle and typing it, you show it which line on your selection should match which line elsewhere, and it does the arithmetic.
It is by TimeSavers for CAD, copyright 2001.
The listing has the wrong name on it
Worth clearing up first. The download table below is headed “Roof Pitch”, which is a different routine entirely — there is a genuine roof pitch routine on this site and it is not this one. The name has been attached to the wrong entry at some point.
The description in the same table is correct: this rotates objects to match an angle. Nothing in the download has anything to do with roofs.
Why matching beats measuring
The usual way to rotate something into alignment is to measure the target angle, then rotate by the difference. That is two operations and an opportunity to get a sign wrong, and it goes badly when the target is not at a round angle.
This asks a different question. You nominate a straight edge on the thing being rotated — the routine calls it the rotation baseline — and then a line whose angle you want that baseline to end up at. The rotation needed is the difference between the two, computed rather than measured.
The sequence documented in the file is five steps: select the objects to rotate, select the baseline on them, select the line whose angle to match, pick the base point for the rotation, then settle the final position. That last step lets you flip the result if the match came out end-for-end, which is the usual thing that goes wrong with an alignment.
It is well built
Worth noting after a long run of 1980s and 1990s files. This one declares a full list of local variables and defines its own error handler under a distinctive name rather than clobbering the general one — the mark of somebody who expected the routine to live alongside other people’s code.
It also appears inside the Best of LISP collection on this site, which is a reasonable indication that other people rated it too.
Command reference
The file defines a single command, ROT2ENT — rotate to entity.
If you also load the Best of LISP collection you will have two copies of it. That is harmless, since they are the same routine, but worth knowing so a duplicate does not look like a problem.
How to load it
Unzip Rot2ent.zip and load Rot2ent.lsp with APPLOAD, or add it to the Startup Suite. No support files. Our AutoLISP guide covers loading.
Step-by-step usage
- Type ROT2ENT and select the objects you want rotated.
- Select the straight segment on those objects that should take on the new angle.
- Select the line whose angle you want to match.
- Pick the base point the rotation should turn about.
- Settle the final orientation.
The baseline you nominate has to be a straight segment. On a shape made of arcs and curves, draw a temporary line along the edge you care about, use that, then erase it.
Compatibility notes
2001, which makes it one of the newer files in this library, and the quality of the code suggests it was meant to last. It does angle arithmetic and drives the ROTATE command, neither of which has changed.
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. It moves geometry, so try it on a copy first.
Download
| Name: | Roof Pitch |
| Description: | Rotates selected objects relative to a specific angle or to match the angle of an existing object. |
| Type: | AutoCAD AutoLISP Routine |
| Author: | See file |
| File Size: | 2 Kb |
| Cost: | Free |
| Worked on: | AutoCAD |
| Download File: | Rot2ent.zip |
The Name row above is the mislabelling described at the top of this page. The download is Rot2ent.
Related routines
- Best of LISP collection — includes a copy of this routine.
- Roof Pitch — the routine the listing above confuses this with.
- TTT — another construction that saves you working out geometry by hand.