• 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

TEXTWELD LISP: Merge Text Into One MText, In Your Order

August 3, 2026

TEXTWELD merges separate Text and MText objects into a single MText, in the order you pick them, preserving each one’s formatting.

What TextWeld does

It is similar to the Express Tools TXT2MTXT command, but with control over the order and over whether each piece starts a new line or continues the previous one — which is what makes it usable on a schedule or a note block that has been drawn as thirty separate lines of text.

While picking: SPACE toggles between New Line and Same Line mode, U undoes the last pick, Shift-click appends the text but keeps the original in place, clicking empty space starts a window selection to add many at once, and Enter finishes.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type TEXTWELD.
  3. Pick the first text object — it becomes the new MText.
  4. Keep picking. Each is appended and the original removed. Press SPACE to switch between new line and same line.
  5. Move the mouse to position the result, and click to place it.

How it works

Formatting is preserved by writing the differences in as MText codes. Where a picked object differs from the MText being built, the difference is written in and wrapped in braces so it applies only to that piece:

\C<n>; colour · \H<n>x; height, as a multiple of the current height · \F<font>; font · \L \l underline on and off, converted from the old %%U codes

So a merged block of text keeps its varying sizes and colours rather than being flattened to the first object’s formatting — which is what happens if you simply concatenate the strings, and what makes a welded schedule look wrong afterwards.

Notes and limits

  • The first object picked becomes the MText, and sets the baseline formatting everything else is expressed relative to.
  • Originals are removed as they are appended, unless you shift-click.
  • The shift-click option needs Express Tools. Without it, everything else still works and shift is simply ignored.
  • Pick order is the reading order. That is the whole advantage over TXT2MTXT.

Download and details

NameTextWeld — merge text objects into one MText, in the order you pick them
DownloadTextWeld.lsp — 23.6 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandTEXTWELD
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size23.6 KB, 604 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

  • TEXTRAIL LISP — align the text before merging it
  • WORDSWAP LISP — find and replace inside the result
  • TEXTCLONE LISP — match formatting rather than merge
  • 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