eplisp

MText to Single-Line Text (M2TX)

eplisp, the free multilingual LISP library

MText to Single-Line Text (M2TX)
Openly licensed; the original file is hosted here together with its license.
…
Rate this tool:
CommandsM2TX
CategoryText Tools
AuthorBGol Community
Sourcethevijayparmar/bgol-cad-lisps
LicenseMIT
RequirementsAutoCAD (full version; not LT), BricsCAD, ZWCAD. Uses Visual LISP ActiveX (vla/vlax) functions.
Prompt languageEnglish
FilesMT2TX-bgol.lsp (4 KB)
Added2026-10-26
Download the original fileSource repository

Turns each selected MText into one single-line TEXT, joining its paragraphs into a single line, and deletes the original MText objects.

M2TX converts multiline text into plain single-line text. Unlike EXPLODE, which splits a multi-paragraph MText into several TEXT objects, this command keeps the whole content together on one line. That is handy when other routines or exports only understand TEXT.

Overview

For each selected MText the routine replaces paragraph breaks with spaces, removes curly braces and creates a TEXT object with the same insertion point, height and rotation. The new text goes on the layer BGOL-M2TX (created in green if missing) and the original MText is erased.

How to use it

  1. Load MT2TX-bgol.lsp with APPLOAD.
  2. Type M2TX and press Enter.
  3. Select the MText objects to convert and press Enter; each one is replaced by a single-line TEXT.

Notes and limitations

  • The original MText objects are deleted; use U (UNDO) to get them back.
  • Only paragraph codes (\P) and braces are stripped. Other inline formatting codes such as font, height or color changes (\f, \H, \C) stay in the string and appear as literal characters.
  • Text style, justification, color and the original layer are not carried over. The new TEXT is left-justified at the MText insertion point, so its position can shift compared with the original.
  • Creates the layer BGOL-M2TX if it is missing.
  • The repository was published in 2026; test on a copy of the drawing first.

Source and license

This tool is not made by eplisp. The file is published unchanged under its author's license; copyright stays with the author.

References

  1. Source repository: thevijayparmar/bgol-cad-lisps – https://github.com/thevijayparmar/bgol-cad-lisps/tree/3acbe32f71b489f4c81dcd9372f989591a9be858/Text%20Lisps/Convert%20MText%20to%20Text%20in%20CAD
  2. Author: BGol Community – https://bgol.in/
  3. License: MIT – https://github.com/thevijayparmar/bgol-cad-lisps/blob/3acbe32f71b489f4c81dcd9372f989591a9be858/LICENSE

Found a mistake, or are you the author of this tool? Request a correction or removal