• 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

TEXTCLONE LISP: MATCHPROP for Text Formatting

August 3, 2026

Standard MATCHPROP copies layer, colour and linetype but leaves height, style, rotation, width factor, oblique angle and justification exactly as they were — which is almost never what you want when tidying annotation. TEXTCLONE copies all of them.

What TextClone does

Works with Text, MText, attributes and attribute definitions. The destination selection is automatically filtered to the same entity type as the source, so picking an MText as source will only match other MText.

TXC is the short alias.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type TEXTCLONE or TXC.
  3. Pick the source — the text that already looks right.
  4. Select the destinations. Only objects of the same type can be picked.

How it works

The text value is never copied. TextString is deliberately absent from the property list. Formatting is copied; content is not. A tool that silently overwrote text content while claiming to fix formatting would be genuinely dangerous — annotation is data.

Justification needs special handling, and this is the considered part. Changing Alignment or AttachmentPoint moves the object, because the text then hangs off a different corner of itself. So for those two properties the current insertion point is captured first, the property applied, and the position written back — which changes the justification while leaving the text visually where it was.

That in turn requires care over which position property to read. Text stores its position in InsertionPoint when left-justified but in TextAlignmentPoint otherwise, while MText always uses InsertionPoint. Reading the wrong one produces text that jumps somewhere unpredictable.

The property list is meant to be edited. Delete a line from TextClone:Properties to stop that property being copied. Run XRAY on a text object to see the full set of names available.

Notes and limits

  • Content is never copied, only appearance.
  • Source and destination must be the same entity type. The filter enforces it.
  • Text does not move when justification changes, which is the opposite of what editing the property directly does.
  • One undo group covers the run.

Download and details

NameTextClone — match text formatting from a source to many targets
DownloadTextClone.lsp — 10.1 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsTEXTCLONE, TXC
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size10.1 KB, 269 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

  • ATTCLONE LISP — the same idea for attributes specifically
  • FORMATBRUSH LISP — matching field number formatting
  • XRAY LISP — list every property name available to add
  • 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