Categories

AutoCAD 2015 and AutoCAD LT 2015 Bible

The most comprehensive AutoCAD book around!

Update: Convert text to Mtext and back

autocad_tips_text-to-mtext-back-1This is an update of an earlier post Convert Text to Mtext and Vice Versa.

AutoCAD offers several types of text or annotation objects. Some are for dimensions or at the end of leaders, for example. But the most common type is text that you use as labels–and there are 2 types. The original type was called single-line text (or Dtext). When you use single-line text, every line is a separate object, ideal for short labels.



But many drawings require lengthy annotation in paragraph form and for that reason Mtext (multiline text) was introduced many years ago. You can format text almost any way you format text in your favorite word processor.autocad_tips_text-to-mtext-back-2

But sometimes, you have single-line text that should be Mtext, or vice versa. I have some old drawings that were created before Mtext! Here are 2 ways to convert between text and Mtext.

Convert single-line text to Mtext

Here’s some text in an old drawing that is single-line text. You can see that one of the lines is selected. It’s a plat description and of course, it should be Mtext. To convert it, use the Express Tools command TXT2MTXT. From the ribbon, choose Express> Text> Convert Text to Mtext.

autocad_tips_text-to-mtext-back-4At the Select objects: prompt, select the text objects that you want to convert. Usually, a window works best for selecting. After all, you don’t want to have to select each line of text individually!

If you press Enter instead, you get the Text to MText Options dialog box, shown here. By default, the command sorts from the top object downward and tries to word wrap the Mtext that it creates. You can choose to order the text by the order you selected it.autocad_tips_text-to-mtext-back-3

One cool feature of TXT2MTXT is that if you select the text objects first, the command executes without further input — very efficient! Also, the command does a true conversion by deleting your old single-line text objects.

You can see that you now have a single MText object.

autocad_tips_text-to-mtext-back-5

Convert Mtext to single-line text

Sometimes, you need to reconfigure your text because it won’t fit anywhere as a paragraph. In these situations, you can convert the Mtext to single-line text.

One way to convert Mtext to text is to copy and paste. Double-click the Mtext to open the Mtext editor. Select the text and copy to the clipboard. Then close the editor.

Start the TEXT command. Specify the start point, height and rotation angle as usual. You’ll then see a small box and cursor. Paste from the clipboard and press Enter to end the command. The text becomes all one line (which can get pretty long if you have a lot of text). Then delete your Mtext object.

Or you can simply explode the Mtext. This method keeps the line wrapping. It all depends on which result you want. A plus is that you don’t have to delete the original object.

down-red-arrows

How do you convert between the 2 types of text? Leave a comment! And help other AutoCAD users by sharing this post with the sharing buttons below.

Ellen Finkelstein

4 comments to Update: Convert text to Mtext and back

  • My recent problem was converting MTEXT in attributes to single line. You can’t explode these. So I found a utility that helped me. Here is the code:
    (vl-load-com)
    ; command that converts multi-line attributes to standard attributes
    (defun c:convertMattribute (/ ss i)
    (if (setq ss (ssget ‘((0 . “ATTDEF”))))
    (progn (setq i 0)
    (repeat (sslength ss)
    (vla-put-mtextattribute (vlax-ename->vla-object (ssname ss i)) :vlax-false)
    (setq i (1+ i))
    )
    )
    )
    (princ)
    )

    Note: you must open the block with BEDIT and run the ConvertMAttribute command, select the attributes (you can use Select All), and the attributes are changed.

  • The reason I was using multiline attributes is simple: only multiline attributes allow you to mask behind the attributes so they do not get lost in the clutter of a drawing.

  • Phoebe

    This does not work in AutoCAD LT. AutoCAD Lt does not have express tools.

    Maybe someday… (wish, wish, wish).

  • Rajender kumar

    How to convert bold text to regular text in mtext globally. currently it is bold text inside the Mtext window, but in the text style it is arial regular.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>