• 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

TAGWIDTH LISP: Squeeze and Stretch Text and Attributes

August 6, 2026

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

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type TAGWIDTH.
  3. Select the text and attributes — a whole column at once if you like.
  4. Squeeze or stretch a step at a time until it fits.
  5. 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 U rather than one per nudge.

Download and details

NameTagWidth — squeeze or stretch text and attributes to fit
DownloadTagWidth.lsp — 9.9 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandTAGWIDTH
Requiresnothing beyond a CAD platform with AutoLISP.
Source size9.9 KB, 229 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

  • 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

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