TAGWIDTH adjusts the width factor of text and attributes — the amount each character is condensed or expanded without changing its height. This is what you reach for when a room name will not fit its room, a title will not fit its box, or a schedule column is a whisker too narrow.
What TagWidth does
Select what you want, then squeeze or stretch it a step at a time and watch it change. Keep going until it fits, then press Enter.
Width factor 1.0 is the font as drawn. Below 1.0 the characters narrow, above 1.0 they widen. Heights and line spacing are untouched, which is why this is the right tool for fitting text and scaling is the wrong one.
Below about 0.7 most fonts start to look pinched, and below 0.5 they become hard to read at plot size. The routine will let you go there, but it says so as you pass.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
TAGWIDTH. - Select the text and attributes — a whole column at once if you like.
- Squeeze or stretch a step at a time until it fits.
- Press Enter.
How it works
TEXT and ATTRIBUTE objects carry a width factor in the object itself, which is what makes this possible at all.
MTEXT has no such property — its width is set by the column width and the style — so MTEXT is reported and skipped rather than silently ignored, which would leave you wondering why half a selection did nothing.
Anything else in the selection that has no width factor is passed over the same way, rather than reaching (+ nil incr) and stopping with a bad argument type.
A floor is applied instead of a warning box. An object that would go to zero width is held at the floor and the run continues, rather than stopping the whole selection behind an alert that has to be dismissed before anything else can happen.
The whole selection is adjusted together, which is the usual case — a column of schedule text is rarely too wide on its own.
Notes and limits
- TEXT and ATTRIBUTE only. MTEXT is reported and skipped.
- Height is untouched — that is the point of it.
- Below 0.5 is hard to read at plot size. You are warned as you pass.
- One undo group covers the whole run, so backing out an adjustment is one
Urather than one per nudge.
Download and details
| Name | TagWidth — squeeze or stretch text and attributes to fit |
| Download | TagWidth.lsp — 9.9 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | TAGWIDTH |
| Requires | nothing beyond a CAD platform with AutoLISP. |
| Source size | 9.9 KB, 229 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
- ATTSQUEEZE LISP — fitting attribute text inside its block
- TEXTRESPACE LISP — evening up the spacing of a stack of text
- TEXTFRAME LISP — boxing text so you can see what fits
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program