Text: from Tedious to Terrific (About Darn Time!)1 Jun, 2003 By: Lynn Allen
There's no getting around the need to annotate your designs. But adding text to your drawings has always been so painful and tedious! Admit it. Isn't that one of the reasons you save this task until the very end? Well, I'm happy to tell you that one of the biggest improvements in AutoCAD 2004 falls under the category of text-mtext to be specific.
Multiline text (mtext) has been such a chore to deal with over the years that many of us have resorted back to our good friend dtext. And why not? Dtext displays on the drawing screen right where you put it. It's very clear what you're going to end up with, and there are no surprises. Mtext, on the other hand, had a mind of its own; the final result was often not the same as the text displayed in the dialog box. We wanted to believe that the mtext dialog box was telling us the truth-that what we saw was what we were going to get-but time and time again it let us down. I likened mtext to the football that Lucy was always holding for poor Charlie Brown. Each time we thought this was going to be the time mtext was going to come through for us, and each time we were disappointed. Simple things, such as tabs and inserts, were just not meant to be. And bringing in a Word doc. Forget about it!
Enter the new, wonderful, and completely overhauled (dare I say beautiful?) AutoCAD 2004 mtext command. This new dialog displays on the screen exactly where you request the text to go. Tabs and Indents are no problem. And those Word documents come in like butter. Let's take a look.
As soon as you enter the mtext command, you'll see a text string displaying a sample of the current text font and height. Right off the bat you'll know if you're going to need to change those settings when you enter the mtext dialog. The text string is customizable (it defaults to abc) and controlled by the new system variable mtjstring (because we just don't have enough system variables). I, of course, immediately changed this to my dog's name once I discovered that I could. After choosing the two corners defining the area you want mtext to display, you'll find that the mtext dialog now displays exactly where it should, not some arbitrary area of the screen as it did before. This ensures you get the same feeling of in-place text editing that you do with the dtext command. If you are zoomed out so far that you wouldn't be able to see the text, mtext will enlarge the text so you can see it. If you're zoomed in too close, mtext will decrease the size of the text while you are in the editor. The mtext editor also remains transparent, so you clearly see any geometry that resides in the background, thus ensuring there's no interference (as long as you have Transparency turned on).
Tabs have never been possible before AutoCAD 2004 (one of the top wishes on the AUGI wish list). Now you only need to hit the tab key. You can easily set your tabs by picking points within the mtext ruler, as shown in Figure 1. You'll also find you can modify your indents by dragging the indent markers on the ruler.
Figure 1. You can set and modify your tabs by picking points within the mtext ruler shown here.
Some of you may prefer to use the new Indents and Tabs dialog found in the right-click shortcut menu in mtext, as shown in Figure 2. Here you can key in exact values for your tab and indent settings.
Figure 2. The new Indents and Tabs dialog shown here is found in the right-click shortcut menu in the Mtext dialog box.
Many of us prefer to use a text editor such as Microsoft Word to create the text that will eventually make its way into AutoCAD. Importing text in releases before AutoCAD 2004 wasn't pretty; most of the formatting, including tabs and indents, was left behind, proving a huge source of irritation. Pasting documents into the mtext editor in AutoCAD 2002 or previous versions and before left the text editor blank, as though nothing had been entered. Most of us simply cancelled out of mtext at this point. Or, we used The Force, closing our eyes and hoping it would work. We were delighted to find the text was there and disappointed to find the formatting was not.
The new mtext editor gladly accepts your Word documents, formatting and all. Simply highlight the desired text, copy it to the clipboard, and then paste it into the Mtext Editor. Not only does the text show up (which shouldn't be a big deal, but it is), but all those beautiful tabs and indents display just as you intended. For a nice added bonus, drag the end of the ruler bar to control the width of the paragraph. All the changes happen in real time, leaving you no cause to doubt the final outcome. You no longer need to be Luke Skywalker to use mtext!
Here's a little hint to help you engineering types change your text to uppercase. (I know how you love those uppercase letters!) Highlight the text you want to convert to uppercase, right-click to get the mtext shortcut menu, and pick Change Case= > UPPERCASE from the shortcut menu. For the record, this can be done in AutoCAD 2000+, but so few people know about it that I thought I'd point it out here.
More Headache Relief
Since the AutoCAD Express Tools are included in AutoCAD 2004, you might find the TEXT to Mtext tool to be helpful now that mtext is so much more usable. It makes it easy for you to convert those paragraphs you built earlier using individual text strings into paragraph text. Then, if you find you need to change the paragraph width, insert additional words, and so on, it will be much easier to do while the text is an mtext object.
If you've had problems bringing Excel OLE documents into AutoCAD (they're too big or too long), you'll find that, if you're using the latest service pack of Microsoft Office XP (SP1), page size will no longer be a problem. That should save a few aspirins.
And one last tip: I'm happy to say that the system variable mirrrtext is finally set to "0" as a default! Hoorah! All of you nerds out there will appreciate this. For you non-nerds, this means that your text objects will no longer default to being mirrored when selected in the MIRROR command.
The developers of AutoCAD 2004 implemented some smart changes in this mtext overhaul. Maybe, just maybe, you won't find annotating your drawings to be so unpleasant anymore. Until next month, Happy AutoCADing!
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor and Autodesk Technical Evangelist Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD video tips. Subscribe to the free Cadalyst Video Picks newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!
Poll not yet available.