A long project name in a fixed-width title block box is a familiar problem, and the usual fix is guessing at width factors in the Properties palette and re-checking after each guess. ATTSQUEEZE lets you drag until it fits, with the value shown live at the cursor, and click.
What AttSqueeze does
Pick a single-line attribute and move the cursor. The width factor follows, the text squeezes or stretches in real time, and the current value is displayed at the cursor as you go. Click to accept.
The point is to stop iterating. You are looking at the box the text has to fit inside, so drag until it fits — no arithmetic, no guess-and-check cycle through a palette.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
ATTSQUEEZE. - Pick the attribute to adjust. Multiline attributes are refused at selection, with an explanation.
- Move the cursor to set the width factor. The live value follows it.
- Click to accept.
How it works
The controls while dragging:
Move the cursor — sets the width factor.
TAB — switch between continuous and stepped adjustment.
I — set the step size, in stepped mode.
R — reset to the width factor of the block’s attribute definition, that is, back to how the block was designed.
C or Escape — cancel, restoring the original width.
Click — accept.
The mode and step size are remembered between AutoCAD sessions, so an office that always works in steps of 0.05 sets it once.
How the drag is calculated. The cursor’s displacement from the attribute’s base point is projected onto the attribute’s own text direction. That gives a distance along the text regardless of which way the cursor actually moved — so dragging diagonally still reads as a sensible squeeze rather than jumping about. That distance is divided by the text’s width at factor 1, measured once at the start, to give the factor.
Because the direction vector comes from the attribute’s own rotation, this works at any angle and in any construction plane. Rotated title blocks and attributes on a UCS behave the same as horizontal ones.
Width factors are constrained to between 0.01 and 100, which is the range AutoCAD itself accepts. Outside it the cursor readout turns red and no change is applied — you can see you have gone too far before you click, rather than being told afterwards.
Notes and limits
- Single-line attributes only. A multiline attribute has no width factor — it wraps instead — so those are refused at selection with an explanation rather than failing silently.
- Width factor is not the same as squeezing the box. This changes the text, not the block geometry around it.
- R resets to the definition, not to whatever the value was when you started. Escape does that.
- One undo group, so a single
Urestores the original width.
Download and details
| Name | AttSqueeze — set an attribute’s width factor by dragging |
| Download | AttSqueeze.lsp — 33.5 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | ATTSQUEEZE |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com). |
| Source size | 33.5 KB, 625 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
- ATTCLONE LISP — copy the finished formatting onto every other attribute
- Text heights in drawings — the height the width factor is working against
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program