• 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

TEXTFRAME LISP: Box Text at a Proportional Offset

August 3, 2026

TEXTFRAME draws a rectangular polyline box around selected Text and MText, at an offset proportional to the text height, optionally with rounded corners. It is equivalent to the Express Tools TCIRCLE command, but with a fillet option and without needing Express Tools installed.

What TextFrame does

The offset is a factor, not a distance. You give a multiplier of the text height rather than an absolute value, so one setting produces visually consistent boxes across a selection containing several different text sizes.

A factor of 0.35 — the default — puts the frame just over a third of a character height clear of the text.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type TEXTFRAME.
  3. Select the Text and MText to box.
  4. Give the offset factor, or press Enter to reuse the last one.
  5. Choose whether to fillet the corners.

How it works

The factor and the fillet preference are remembered between sessions, held in AutoCAD’s environment settings rather than in memory, so they survive closing and reopening the program — not just reloading the file.

Each frame inherits the layer, linetype, lineweight, colour and thickness of the text it surrounds, so boxes land on the same layer as their text without any further tidying. Box thirty labels spread across six layers and every frame is on the right one.

Works with text at any rotation and in any UCS.

Notes and limits

  • The offset is proportional, so one factor suits a mixed-size selection.
  • Frames inherit the text’s properties, including its layer.
  • The frames do not follow the text if it is edited. Change the wording and the box stays the old size.
  • Settings survive restarts, being kept in the environment rather than in memory.

Download and details

NameTextFrame — draw a box around text at an offset proportional to its height
DownloadTextFrame.lsp — 14.4 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandTEXTFRAME
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size14.4 KB, 348 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

  • BACKDROP LISP — masking behind text rather than framing it
  • RULE1 LISP — strikethrough and underline for the same text types
  • SHRINKWRAP LISP — outline a whole group rather than box each item
  • 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