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
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
TEXTWELD. - Pick the first text object — it becomes the new MText.
- Keep picking. Each is appended and the original removed. Press
SPACEto switch between new line and same line. - 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
| Name | TextWeld — merge text objects into one MText, in the order you pick them |
| Download | TextWeld.lsp — 23.6 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | TEXTWELD |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com). |
| Source size | 23.6 KB, 604 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
- 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