RTLA LISP: Rotate Text to Match Layout Twist (Free AutoLISP Download)
When a paper-space Layout viewport is rotated (a common trick for fitting long linear projects like roads or pipelines onto standard sheet sizes), Model Space text that looked correctly oriented can appear tilted in the printed output. LYTALIGN-bgol.lsp provides a two-command workflow to fix this: RTLA tags Model Space text with its intended reference angle, and RTLM creates a rotated copy of that text compensated for the layout's twist, so it reads correctly on the printed sheet.
LYTALIGN-bgol (Rotate Text to Match Layout Twist)
Command Type: AutoLISP routine, 2-command pair (works in AutoCAD, BricsCAD, ZWCAD and most AutoLISP-compatible CAD platforms)
Developed by: BGol Community, bgol.in
Inspired by the general concept of layout-rotation text compensation utilities used in CAD drafting. This is an original, independently written routine, new file name, new command names, new source code, created so the CAD community has a free, editable, open-source alternative.
Overview
When a paper-space Layout viewport is rotated (a common trick for fitting long linear projects like roads or pipelines onto standard sheet sizes), Model Space text that looked correctly oriented can appear tilted in the printed output. LYTALIGN-bgol.lsp provides a two-command workflow to fix this: RTLA tags Model Space text with its intended reference angle, and RTLM creates a rotated copy of that text compensated for the layout's twist, so it reads correctly on the printed sheet.
How to Use
- Load
LYTALIGN-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - In Model Space, type
RTLAand press Enter. - Select the text entities that should carry a reference angle (their current rotation is stored as the reference).
- Switch to (or activate) the target Layout / rotated viewport.
- Type
RTLMand press Enter. - Enter the viewport's twist angle in degrees when prompted.
- Select the same tagged text again, a rotation-compensated copy of each is created on a dedicated layer,
BGOL-RTLM(colour blue), oriented so it reads correctly given the layout's rotation.
Why Use It
- Keeps text readable, compensates automatically for a rotated layout/viewport instead of requiring manual angle recalculation for every label.
- Repeatable, once text is tagged with
RTLA,RTLMcan be re-run any time the layout's twist angle changes. - Non-destructive,
RTLMcreates new compensated copies rather than altering your original Model Space text.
Where to Use It
- Drawings where the printing Layout has been rotated to better fit long linear projects (roads, pipelines, alignments) onto a standard sheet.
- Multi-sheet plotting workflows where several layouts at different rotation angles reference the same Model Space content.
- Any drafting task needing text to stay legible in a rotated viewport without manually recomputing each label's angle.
Notes
- The reference angle is stored as XDATA (application name
BGOL-RTLA) on the original text, so it persists with the drawing and can be re-used across multipleRTLMruns. RTLMcomputes each compensated angle asreference angle โ viewport twist angle(both in radians internally; the prompt accepts degrees).- If a selected text was never tagged with
RTLA,RTLMfalls back to using that text's own current rotation as the reference. - Source code is fully open, feel free to study, modify, and redistribute it under the same open, free-for-all spirit.
Credits
Developed and shared for the CAD community by BGol Community. Website: https://bgol.in/ Free and open-source, use it, modify it, share it, for personal or commercial work alike.
Frequently Asked Questions
RTLA is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
The reference angle is stored as XDATA (application name BGOL-RTLA) on the original text, so it persists with the drawing and can be re-used across multiple RTLM runs.
Keeps text readable, compensates automatically for a rotated layout/viewport instead of requiring manual angle recalculation for every label.
Yes. RTLA is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.
Drag and drop LYTALIGN-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type RTLA at the command line to run it.
๐ค About BGol Community
BGol Community of Advanced Surveying builds and shares free, open-source tools for the survey and CAD drafting community.
๐ Made with โค๏ธ by BGol Community of Advanced Surveying
Free, open-source, and built for the CAD community, for personal or commercial use, always.