Homeโ€บ Blogโ€บ M2TX LISP: Convert MText to Single-Line Text Free Download
๐Ÿ“ LISP

M2TX LISP: Convert MText to Single-Line Text Free Download

๐Ÿงฎ 1  |  ๐ŸŸข 1
20 May 2026 Trishunya Team
M2TX LISP: Convert MText to Single-Line Text Free Download
๐Ÿ“ LISP · CAD UTILITIES

M2TX LISP: Convert MText to Single-Line Text (Free AutoLISP Download)

๐Ÿ“… 20 May 2026 ๐Ÿท๏ธ CAD BGBgol Global
M2TX AutoLISP routine, Convert MText to Single-Line Text, shown inside a CAD window

M2TX converts selected MTEXT entities into equivalent single-line TEXT entities. Unlike AutoCAD's native EXPLODE, which splits multi-line MText into multiple separate TEXT entities (one per line), M2TX flattens all lines into a single continuous TEXT entity, easier to select, move, and process with the other TEXT-only routines in this collection.

MT2TX-bgol (Convert MText to Single-Line Text)

CATEGORY
Text Lisps
COMMAND NAME
M2TX
LISP FILE
MT2TX-bgol.lsp
LICENSE
Open-source, free

Command Type: AutoLISP routine (works in AutoCAD, BricsCAD, ZWCAD and most AutoLISP-compatible CAD platforms)
Developed by: BGol Community, bgol.in

Inspired by the general concept of MText-to-Text flattening utilities used in CAD drafting. This is an original, independently written routine, new file name, new command name, new source code, created so the CAD community has a free, editable, open-source alternative.

Overview

M2TX converts selected MTEXT entities into equivalent single-line TEXT entities. Unlike AutoCAD's native EXPLODE, which splits multi-line MText into multiple separate TEXT entities (one per line), M2TX flattens all lines into a single continuous TEXT entity, easier to select, move, and process with the other TEXT-only routines in this collection.

How to Use

  1. Load MT2TX-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type M2TX at the command line and press Enter.
  3. Select the MTEXT entities you want to convert, then press Enter to confirm.
  4. Each selected MText's full content is flattened (line breaks and basic formatting codes removed/collapsed to spaces) and recreated as a new single-line TEXT entity, on layer BGOL-M2TX (colour green), at the original MText's insertion point, height, and rotation. The original MText entity is deleted.

Why Use It

  • Compatibility, converts content into plain Text so it becomes usable by other LISP routines and commands that only recognize the TEXT entity type.
  • Avoids Fragmentation, unlike native EXPLODE, keeps multi-line content as one single-line Text entity instead of splitting it into several.
  • Performance, reduces drawing complexity/slowdown associated with MText entities, especially in drawings with many MText objects.

Where to Use It

  • Preparing a drawing for processing by other LISP tools in this collection (or any Text-specific AutoLISP routine) that cannot operate on MText.
  • Simplifying drawings with many MText labels into lighter-weight, more easily editable single-line Text entities.
  • Cleanup/standardization pass before running text-based QA, export, or batch-editing routines that expect plain Text.

Notes

  • Formatting codes such as \P (paragraph break) and simple {...} grouping braces are stripped; complex nested formatting (stacked fractions, field codes) is not specially reconstructed, the flattened plain text content is preserved.
  • The original MText is deleted after conversion; keep a backup copy of the drawing if you want to retain both forms.
  • Source code is fully open, feel free to study, modify, and redistribute it under the same open, free-for-all spirit.

Credits

Developed and shared for the CAD community by BGol Community. Website: https://bgol.in/ Free and open-source, use it, modify it, share it, for personal or commercial work alike.

Frequently Asked Questions

What CAD platforms does M2TX work on?

M2TX is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.

What should I know before using M2TX?

Formatting codes such as \P (paragraph break) and simple {...} grouping braces are stripped; complex nested formatting (stacked fractions, field codes) is not specially reconstructed, the flattened plain text content is preserved.

What is the main benefit of using M2TX?

Compatibility, converts content into plain Text so it becomes usable by other LISP routines and commands that only recognize the TEXT entity type.

Is M2TX free to use for commercial projects?

Yes. M2TX is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.

How do I load the M2TX command into my drawing?

Drag and drop MT2TX-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type M2TX at the command line to run it.

๐Ÿค About BGol Community

BGol Community of Advanced Surveying builds and shares free, open-source tools for the survey and CAD drafting community.

๐Ÿ™Œ Made with โค๏ธ by BGol Community of Advanced Surveying

Free, open-source, and built for the CAD community, for personal or commercial use, always.

Back to all articles