Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Книги_AutoCad_2 / AutoCAD 2006 and AutoCAD LT 2006 Bible_2004г__.pdf
Скачиваний:
142
Добавлен:
09.04.2015
Размер:
17.83 Mб
Скачать

Chapter 13 Creating Text 349

Figure 13-23: The plat acreage table.

Inserting Fields

Most drawings contain information about the drawing, such as the last date it was revised, the person who saved the drawing, or the sheet number in a sheet set. Draft plots often contain additional information such as the time and drawing name. You may also want to insert information about drawing objects, such as the area or circumference of a circle. Fields are a way to insert this information into the drawing. You can also place fields in block attributes, which I discuss fully in Chapter 18. When your drawing changes, you can update the fields to keep them current.

Fields are not available in AutoCAD LT.

You can insert fields anywhere that you might normally use text. As you start using fields, you’ll think of many uses for them. You can format the text of a field in the same way that you format any multiline text.

On the

Sfld creates custom fields. Look in \Software\Chap13\sfld.

CD-ROM

 

350 Part II Drawing in Two Dimensions

Creating fields

To create a new field as a multiline text object, you can use two methods:

Choose Insert Field.

Open the In-Place Text Editor or any other text box where you can enter text, right-click in the editor or text box, and choose Insert Field from the shortcut menu.

Whichever method you use, the Field dialog box opens, as shown in Figure 13-24.

Figure 13-24: Use the Field dialog box to choose, format, and insert a field into your drawing. Here you see the options for the Date field.

To insert the field, follow these steps:

1.Choose a field category from the Field Category drop-down list. You can use the All category to display all of the fields. The other categories help you to filter the fields, so that you can more easily find the field that you want.

2.From the Field Names list, choose the field that you want to use.

3.Depending on the field that you choose, you can usually select a format or example for the field. For example, you can choose a date format (such as m/d/yyyy) or a text format (such as title case).

4.Click OK.

If you opened the Field dialog box by choosing Insert Field, the MTEXT command starts, and you see the Specify start point or [Height/Justify]: prompt. Pick a start point or use one of the options.

If you started the MTEXT command first, the value of the field appears in the In-Place Text Editor. Click OK on the editor’s main toolbar to place the text.

Chapter 13 Creating Text 351

By default, fields appear in your drawing with a gray background. This background doesn’t plot. If you want, you can remove the background by choosing Tools Options and clicking the User Preferences tab. In the Fields section, uncheck the Display Background of Fields check box. Click OK to close the Options dialog box.

Note that there are two date-related fields. The CreateDate field creates a date based on the current date. This field does not change if you open the drawing on a future date. For example, you can use this field to show the last time a drawing was updated. The Date field always shows the current date.

The Document category of fields relates to data that you complete in the Properties dialog box. To complete this data, choose File Drawing Properties. The SheetSet category of fields is used with sheet sets. You can add a hyperlink to a field. For example, if your field refers to another sheet in a sheet set, the field can be a hyperlink that opens that other sheet.

Cross-

I cover the Properties dialog box and sheet sets in Chapter 26. For more information about

Reference

hyperlinks, see Chapter 28.

 

Figure 13-25 shows an example of a title block that uses fields.

Figure 13-25: Filling in a title block is easier when you use fields.

Editing and updating fields

To edit a field, double-click the field’s text to open the In-Place Text Editor. Select the text, right-click, and choose Edit field. The Field dialog box opens. You edit a field in the same way that you define the field originally. When you’re done, click OK. The field is reevaluated immediately. Close the In-Place Text Editor to place the edited field.

By default, a field is evaluated and updated, if necessary, whenever you open, save, plot, eTransmit, or regenerate a drawing. (See Chapter 28 for information on eTransmitting a drawing.) You can change when AutoCAD updates a field by choosing Tools Options and clicking the User Preferences tab. In the Fields section, click Field Update Settings. Check or uncheck the items that you want, and then click Apply & Close. Click OK to close the Options dialog box.

You can manually update a field if you want. For example, you may have an object field that displays the radius of a circle. If you resize the circle, you probably want to update the field.

To update a field, double-click the field to open the In-Place Text Editor. Select the text, rightclick, and choose Update Field. Close the In-Place Text Editor to return to your drawing.

352 Part II Drawing in Two Dimensions

 

Another method is to select the field and choose Tools Update Fields. You can select as

 

many fields as you want.

Tip

To update all of the fields in a drawing, press Ctrl+A to select all of the objects in your

 

drawing and choose Tools Update Fields.

 

You can convert a field to text. Double-click the field to open the In-Place Text Editor. Select

 

the text in the field, right-click and choose Convert Field to Text.

 

What happens to fields when you open a 2006 drawing in a previous release of AutoCAD?

 

The fields display at their last value in the 2006 drawing but are not updated. If you open an

 

AutoCAD drawing with fields in AutoCAD LT, the fields display and update properly, unless

 

you have changed the value of the FIELDEVAL system variable to disable updating in certain

 

situations.

On the

The drawing used in the following exercise on using fields, ab13-d.dwg, is in the Drawing

CD-ROM

folder on the CD-ROM.

 

STEPS: Using Fields

1.Open ab13-d.dwg from your CD-ROM. Save the file as ab13-07.dwg in your AutoCAD Bible folder. This drawing is zoomed in on the title block.

2.To set some of the drawing properties, choose File Drawing Properties. (I cover the Properties dialog box in Chapter 26.) On the Summary tab, type the following in the Title field: 6" thru 12" 2727 EPV Valves.

3.On the Custom tab, click Add. Enter the following two fields and values:

Drafter

Enter your initials

Dwg No

SK-1972

4.Click OK to return to your drawing.

5.Choose Multiline Text from the Draw toolbar. Pick two boundary points within the Title box of the title block. The In-Place Text Editor opens. Right-click and choose Insert Field to open the Field dialog box.

6.From the Field Category drop-down list, choose Document. From the Field Names list, choose Title. From the Format list, choose Title Case. Click OK. Click anywhere outside the In-Place Text Editor to place the field.

7.Again choose Multiline Text from the Draw toolbar. Pick two boundary points within the Dwg No box of the title block. In the In-Place Text Editor, right-click and choose Insert Field to open the Field dialog box.

8.From the Field Names list, choose Dwg No. Click OK. Click anywhere outside the In-Place Text Editor to place the field.

9.Again choose Multiline Text from the Draw toolbar. Pick two boundary points within the Date box of the title block. In the In-Place Text Editor, right-click and choose Insert Field.

Соседние файлы в папке Книги_AutoCad_2