Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Autocad 2005 And Autocad LT 2005 Bible (2004).pdf
Скачиваний:
92
Добавлен:
17.08.2013
Размер:
32.22 Mб
Скачать

310 Part II Drawing in Two Dimensions

Creating Multiline Text

Single-line text is awkward when you want to type quite a bit of text. The main disadvantage is that single-line text does not wrap text to the next line to keep a neat right margin. Multiline text (also called paragraph text and not to be confused with multilines, which I cover in Chapter 16) solves this problem and also offers many more formatting options compared to singleline text. The entire paragraph of multiline text is one object.

The Multiline Text Editor that you use to create multiline text resembles Windows word processors. You use this box both to create and also to edit text and its properties.

Using the Multiline Text Editor

To create paragraph text, choose Multiline Text from the Draw toolbar. This starts the MTEXT command. The prompt tells you the current style and text height. For example:

Current text style: ROMANS. Text height: 4 1/2"

 

The command continues with the Specify first corner: prompt. Specify one corner of

 

a bounding box to specify where to place the text. At the Specify opposite corner or

 

[Height/Justify/Line spacing/Rotation/Style/Width]: prompt, specify the diago-

 

nally opposite corner of the bounding box. You can also choose one of the other options to

 

specify the text properties before you type in the text. Some of these options are also avail-

 

able in the Multiline Text Editor, which opens after you’ve specified the bounding box. Fig-

 

ure 13-17 shows the Multiline Text Editor.

Tip

When you specify the corners of the Mtext box, you see sample text at the cursor to give you

 

an idea of the actual current height of the text. You can change the sample text with the

 

MTJIGSTRING system variable.

Figure 13-17: The Multiline Text Editor.

Type your text in the large edit box. The Multiline Text Editor wraps the text to the next line when it senses that the text has met the right side of the bounding box you specified. Although you’ve created a bounding box with four sides, only the paragraph width (that is, the left and right margins) limit the text. If you type too much text for the bounding box, the Text Editor expands vertically.

Chapter 13 Creating Text 311

Note

Tip

When you type, the text may be enlarged or reduced in size for readability. This can be disconcerting, but when you close the editor, the text takes on the correct size. You can disable this size variability and display the Multiline Text Editor at its last location by setting the MTEXTFIXED system variable to 1.

To format selected or new text, use the buttons on the Text Formatting toolbar:

Style: Choose any text style from the Style drop-down list.

Font: Choose any font from the Font drop-down list.

Text Height: Choose a height from the drop-down list or type a new height in the Text Height box.

Bold: If Bold is supported for the font, select text and click Bold.

Italic: If Italic is supported for the font, select text and click Italic.

Underline: Select text and click Underline.

Undo: Undoes the last Mtext edit.

Redo: Redoes the last undo operation.

Stack/Unstack: Toggles stacking and unstacking fractions. Use this option to stack characters that are not numerals and not immediately before or after the three AutoStack symbols (slash, pound sign, and carat). Select the text and click Stack/Unstack. See the next section for more details.

Color: Choose ByLayer or any color from the Color drop-down list. To choose from additional colors, choose Select Color to open the Select Color dialog box. (See Chapter 11 for details on using this dialog box.)

To create an exponent (or superscript), type a number and then a carat, as in 2^. Select the number and the carat and click the Stack/Unstack button. To create a subscript, type a carat, and then the number, as in ^2, and stack it.

Right-click in the editor to display the shortcut menu. The shortcut menu contains many important controls that are not available elsewhere. You have the following options:

Undo: Undoes the last Mtext edit.

Redo: Redoes the last undo operation.

Cut: Places selected text in the Windows Clipboard and removes it from the editor.

Copy: Places selected text in the Windows Clipboard without removing it from the editor.

Paste: Places text from the Windows Clipboard.

Insert Field: Inserts a field. For more information, see the “Inserting Fields” section later in this chapter.

312 Part II Drawing in Two Dimensions

Indents and Tabs: Opens the Indents and Tabs dialog box, as shown in Figure 13-18. You can set the following:

First line indentation: Sets the indentation for the first line of the paragraph.

Paragraph indentation: Sets the indentation for every line of the paragraph except the first line. Use this indentation for creating bulleted and numbered lists. To indent an entire paragraph, use both first-line and paragraph indentation.

Tabs: Type the location of each tab.

Tip

It’s easier to set indentation and tabs on the Multiline Editor’s ruler than in the dialog box.

 

Drag the first line indent marker (the top triangle at the left of the ruler) or the paragraph

 

indent marker (the bottom triangle) to the left or right. To set a tab, click on the ruler where

 

you want the tab. To delete a tab, drag a tab marker off the ruler.

 

Figure 13-18: Use the Indents and Tabs dialog

 

box to set indents and tabs for your text.

Justification: Choose a justification from the submenu. The justifications are discussed in the “Justifying single-line text” section earlier in this chapter.

Find and Replace: Opens the Replace dialog box so that you can find or replace specified text. If you want the search to match the case of the specified text, choose Match Case. If you want the search restricted to whole words that match the specified text, choose Whole Words. To find text, ignore the Replace text box. To both find and replace text, enter text in both boxes. Make sure that the cursor is at the beginning of the text if you want to search the entire Mtext object.

Select All: Selects all the text.

Change Case: Changes the case of selected text to uppercase or lowercase.

AutoCAPS: Automatically changes newly typed and imported text to uppercase, even if the Caps Lock key is not on. (And it’s a cute pun on AutoCAD.)

Remove Formatting: Removes formatting, such as bold and italic. Does not remove color or font changes.

Combine Paragraphs: Combines separate paragraphs into one. First select the paragraphs that you want to combine.

New

AutoCAD 2005 introduces a large selection of new symbols that you can now easily insert

Feature

into your multiline text.

 

Chapter 13 Creating Text 313

New

Feature

Symbol: Inserts the degree, plus/minus, or diameter symbol, a non-breaking space, and a number of other, new symbols. Or choose Other to open the Windows Character Map to choose any of the available symbols. Click a symbol, and then click Select. Click Copy and then click the Close button to close the Windows Character Map. In the Text Editor, press Ctrl+V to paste in the symbol.

Import Text: Opens the Select File dialog box, which lets you choose a text (.txt) or Rich Text Format (.rtf) file to import. (Rich Text Format preserves formatting from application to application. Text-only documents retain no formatting.) Find the file, choose it, and click Open to insert the text into the Multiline Text Editor. The maximum file size is 16K. Other techniques for importing text are covered later in this chapter.

Background Mask: Opens the new Background Mask dialog box, shown in Figure 13-19. This new feature creates a background around your text that covers other objects so that you can easily read the text. Check the Use Background Mask checkbox. Specify a border offset factor to create a margin around the text. The default margin setting of 1 does not create any margin. Then check the Background checkbox to use the color of your drawing screen or choose another color from the drop-down list. Click OK.

Character Set: Lets you choose the language you want to work with, so that you have the characters that you need for that language.

A new command, TEXTTOFRONT moves all text in your drawing to the front of the drawing order. For the background mask to work, your text needs to be on top, so you can use this new command when you are creating text with background masks. The display order of objects is controlled by the DRAWORDER command, which I discuss in Chapter 27, at the end of the “Controlling image display” section.

After you finish creating multiline text, close the editor in one of three ways:

Click OK on the Text Formatting bar

Click anywhere outside the Multiline Text Editor (but inside the drawing area)

Press Ctrl+Enter

Figure 13-19: Use the Background Mask dialog box to create a background around your text so that no other object obscures the text.

Tip

You can snap to the corners of the Mtext bounding box using the Node Object Snap. (See

 

Chapter 4 for an explanation of object snaps.) To turn off this feature, change the OSNAP-

 

NODELEGACY system variable to 1.

314 Part II Drawing in Two Dimensions

Creating stacked fractions automatically

You can create automatic stacked fractions and tolerances as you type, using a system similar to those described earlier for creating special characters with DTEXT/TEXT.

You can also type unstacked fractions (as in 1/2), select the fraction text, and then click Stack/ Unstack on the Character tab. To create stacked fractions as you type, open the Multiline Text Editor and follow these steps:

1.Type the numerator (or text that you want on top).

2.Type the character that defines the fraction format you want (see the nearby figure):

Type a slash (/) to create a fraction separated by a horizontal line.

Type a pound symbol (#) to create a fraction separated by a diagonal line.

Type a carat (^) to create a tolerance stack, which is like a fraction separated by a horizontal line except that there is no horizontal line.

Typed as 3/5

Typed as 3#5

Typed as 3^5

3.Type the denominator.

4.Type a space (or other nonnumeric character). The AutoStack Properties dialog box opens.

5.Change any settings you want to change, and click OK to create the stacked fraction. To use the settings in the AutoStack Properties dialog box:

Uncheck Enable AutoStacking to disable the automatic stacked fraction feature.

Uncheck Remove Leading Blank if you want to retain a space between whole numbers and fractions.

Choose whether you want the slash to result in a fraction with a horizontal line or a fraction with a slash. This choice has no effect on how the pound sign and carat work. If you want the slash to result in a fraction with a slash (which would seem to make more sense), you have no automatic way to create a fraction with a horizontal line.

Check Don’t Show This Dialog Again; Always Use These Settings to stop the dialog box from opening when you create automatic stacked fractions.

Click OK to create the stacked fraction or Cancel to leave the numbers as you typed them.

Chapter 13 Creating Text 315

AutoStack only works with numerals immediately before and after the slash, pound sign, and carat.

You can also set the properties of individual stacked fractions. Right-click the fraction in the Multiline Text Editor and choose Properties from the menu. In the Stack Properties dialog box, you can change the following properties:

Text: Edit the upper and lower text.

Style: Change the fraction style. (Refer to the nearby figure for the three possible styles.)

Position: Position the fraction so that the top, center, or bottom is aligned with other text.

Size: Change the size of the numbers that make up the fraction. Fraction numbers are usually smaller than regular numbers.

Specifying and changing line spacing

You can specify the spacing between lines in multiline text. Line spacing is useful for fitting text into a schedule or table in your drawing. Of course, you can also use the new table feature (see the section “Creating Tables” later in this chapter). To set line spacing:

1.Start the Mtext command.

2.At the Specify first corner: prompt, pick the first corner of your Mtext box.

3.At the next prompt, Specify opposite corner or [Height/Justify/Line spacing/Rotation/Style/Width]:, choose Line spacing.

4.At the Enter line spacing type [At least/Exactly] <Exactly>: prompt, choose Exactly.

5.At the Enter line spacing factor or distance <1x>: prompt, type a number, such as 1 to specify a one unit space between lines of text. (If you type 1x, you get single line spacing, which varies according to the size of the text.)

6.Then continue with the command.

This setting persists for future Mtext objects. To change existing line spacing, select (but do not double-click) the multiline text. Open the Properties palette and set one or more of the following:

Line space factor: Specifies line spacing as a multiple of lines. Single line spacing is 1.0000; double line spacing is 2.0000.

Line space distance: Specifies line spacing in units. Use this measurement (along with a line space style of Exactly) to fit text into an existing table or schedule.

Line space style: Choose At Least (the default) to adjust line spacing based on the height of the largest charter in the line of text. Choose Exactly to specify line spacing that is the same regardless of differences in character height.

316 Part II Drawing in Two Dimensions

Specifying width and rotation

To change the width of an Mtext object, you can use its grips:

1.Select the Mtext object.

2.Click one of the grips that you want to stretch to make it “hot.” (For instructions on using grips to edit objects, see Chapter 10.)

3.At the Specify stretch point or [Base point/Copy/Undo/eXit]: prompt, pick a new location for the grip, to make the multiline text wider or narrower.

You can use the Properties palette to change the width and height. You can specify the exact width when creating the Mtext object by using the Width option after you specify the first corner of the Mtext box. Otherwise, you generally specify the width by picking the two corners of the Mtext box.

Tip

When the Multiline Text Editor is open, you can change the width of the Mtext object by drag-

 

ging on the right edge of the ruler. You can also change the width of the editor by dragging

 

on the right edge of the editor box.

To rotate an existing Mtext object, use the Properties palette or use the grips:

1.Select the Mtext object.

2.Click one of the grips to make it “hot.”

3.Right-click and choose Rotate.

4.At the Specify rotation angle or [Base point/Copy/Undo/Reference/eXit]: prompt, pick a new location for the grip or type a rotation angle.

You can also specify the rotation while creating the Mtext object. Use the Rotate option that appears on the command line after you specify the first corner.

Editing paragraph text

To edit paragraph text, double-click the text to open the Multiline Text Editor.

Note If you choose single-line text created with TEXT or DTEXT, the Edit Text dialog box opens (refer to Figure 13-7).

Make your changes in the edit box. The techniques are similar to those in any word processor. Your options are:

Select text and press Del to delete the text or type to replace the selected text.

Click to move the insertion point to where you want to insert text and start typing. (To type over text, press Insert to enter overtype mode.)

Use the toolbar or shortcut menu (right-click) to change formatting.

To change characters, you must first highlight the characters. This lets you make height or font changes to individual words or even letters. When changing properties that affect the entire paragraph, such as justification, you do not first highlight the characters.

Chapter 13 Creating Text 317

If you right-click in the Multiline Text Editor with the cursor on a field, you have options to edit the field, update it, or convert it to regular text. For more information about fields, see the section “Inserting Fields” later in this chapter.

On the

Mmt combines two MText objects into one MText paragraph. Look in \Software\Ch13\

CD-ROM

Mmt on the CD-ROM. (It works with AutoCAD only.)

Importing text

As mentioned earlier, you can import text using the Multiline Text Editor. You can import text in three other ways:

Cross-

Reference

On the

CD-ROM

You can use drag-and-drop to insert text into a drawing. Open Windows Explorer and locate the file. It should be a text (.txt) or Rich Text Format (.rtf) file. Position the Explorer window so that you can see the filename and your drawing at the same time. Click the file and drag it to your drawing. Close Windows Explorer and move the text to the desired location.

You can copy text from another file to the Windows Clipboard. Open the other file, select the text, and choose Copy from the Standard toolbar. Return to your drawing by clicking the AutoCAD or AutoCAD LT button on the Windows Taskbar. Choose Paste from the Standard toolbar. The OLE Properties dialog box opens (by default). Specify the properties of the object and click OK.

If you’re in the Multiline Text Editor, you can paste the text directly into the editor. Rightclick in the editor and choose Paste (or use Ctrl+V). You can then format the text.

For more information on importing text, see Chapter 27.

The files used in the following Step-by-Step exercise on creating multiline text, ab13-c.dwg and ab13-c.txt, are in the Drawings folder on the CD-ROM.

STEP-BY-STEP: Creating Multiline Text

1.Open ab13-c.dwg from your CD-ROM.

2.Save the file as ab13-05.dwg in your AutoCAD Bible folder. This is a plat drawing, as shown in Figure 13-20.

3.Choose Multiline Text from the Draw toolbar. At the prompts, pick points 1 and 2 in Figure 13-20. The Multiline Text Editor opens. In the Text Height box, change the height to 12.5. In the main editing box, type the following:

Containing 108.33 acres including 5.97 acres existing R.O.W. and 4.56 acres proposed R.O.W.

4.Highlight the text 108.33 and click Underline. Right-click in the text window and choose Justification Middle Left. Click OK to place the text.

318 Part II Drawing in Two Dimensions

4 5

1

2

3

Figure 13-20: The plat drawing.

Thanks to Bill Maidment of Cantech, Inc., Fairfield, Iowa, for this drawing.

5.Open Windows Explorer (right-click the Start button and choose Explore). Find ab13-c. txt on your CD-ROM. Move the Windows Explorer window so that you can see both ab13.txt and your drawing screen. Drag ab13-c.txt from the Windows Explorer window to 3 in Figure 13-20. If necessary, pick a grip, press the Spacebar once to choose the Move option, and click at the proper location.

6.Select the text and open the Properties palette. (Click Properties on the Standard toolbar.) Next to the Width item, type 500 . Next to the Height item, type 12.5 .

7.Use ZOOM Window to zoom in on the new text. This text was originally single-line text in an older drawing. You can see why you wouldn’t want to retype it!

8.Choose Zoom Previous on the Standard toolbar to return to your original view. Use Zoom Window to zoom in to the area bounded by 4 and 5. Set the current layer to 0 (which is a gray color).

9.Above the text about the proposed R.O.W. (right of way) is a yellow center line. You want to place text on that line with a background mask so that the line doesn’t make the text hard to read. Choose Multiline Text from the Draw toolbar.

10.At the prompt, pick 4 and 5, centering the boundary box around the yellow center line. In the Text Height box of the Text Formatting toolbar, change the text to 12.5. The text style should be ROMANS. Type the following text:

64TH AVE N.W. EXISTING R.O.W. 66’ - CURRENT

11.Press the spacebar to add a space after CURRENT and right-click to open the shortcut menu. Choose Symbol Center Line to add the center-line symbol to the end of the text.

12.Right-click and choose Background Mask. In the Background Mask dialog box, select the Use Background Mask checkbox. Choose Red as the background color and click OK. Click anywhere outside the Multiline Text Editor to place the text. You can see that it uses the center-line symbol and has a red background that hides the yellow center line behind the text.

13.Choose Zoom Previous to return to your original view. Save your drawing.