TEXTRANK aligns a group of single-line text objects onto a common line, optionally equispacing them at a chosen multiple of the text height. Pick a scattered set of labels and they snap into a tidy column.
What TextRank does
Alignment is perpendicular to the text’s own rotation, so rotated text aligns along its own axis rather than being forced to horizontal.
Two modes, chosen at the spacing prompt. Press Enter and the text is aligned but each object keeps its existing position along the line — use this to straighten a column that is already correctly spaced. Enter a factor and the text is aligned and equispaced at that multiple of the text height. A factor of 1.5 gives one and a half line spacing, which is a common annotation standard.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Position the anchor text where you want the column to start — see below.
- Type
TEXTRANK. - Select the text. Select last the object whose rotation should set the alignment axis.
- Press Enter to align only, or give a spacing factor to equispace as well.
How it works
The first object in the sorted order — the one furthest along the alignment axis — is treated as the anchor and does not move. Everything else lines up to it. So position that one where you want the column to start before running the command.
Knowing which object stays put is the difference between one run and three: get the anchor right and the column lands where you intended first time.
Notes and limits
- The routine assumes every text object in the selection shares the same rotation, and takes its alignment axis from the last object selected. A mixed-rotation selection will not behave.
- Single-line text. For MText and for live dragging, use TEXTRAIL.
- The furthest-along object is the anchor and does not move.
- Spacing is a multiple of text height, so it stays proportionate at any size.
Download and details
| Name | TextRank — align and optionally equispace single-line text |
| Download | TextRank.lsp — 9.0 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | TEXTRANK |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com). |
| Source size | 9.0 KB, 214 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| Compatibility | AutoCAD (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. |
| Author | YZ, August 2026 |
| Licence | Free to use, supplied “as is” with no warranty. |
References
- TEXTRAIL LISP — dynamic alignment by dragging, including MText and curves
- TEXTCLONE LISP — match the formatting across the aligned column
- Text heights in drawings — the height the spacing factor multiplies
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program