In AutoCAD (2005, 2006, 2007), you can use Fields to automate textual data within your drawings. It may seem like a new and scary concept but it really isn’t. Have you ever inserted an automatic page number or date in a Word doc? Those are fields!
You can add fields to text, attributes and tables in your AutoCAD drawings. While creating or editing any of these objects, simply right-click and select Insert Field from the right-click menu. (Note: While you *can* add fields to attribute values within block instances, I strongly discourage that practice. If you want block attributes to include fields, you should add them as attribute defaults for the attribute definitions within the block definitions.)
Here are some of my favorite examples of where you might want to use fields in your AutoCAD drawings.
You can combine field functionality with familiar Mtext editing to create a plot stamp that is as flexible in appearance and location as any other piece of text. Since the plot stamp is actually an Mtext object, you can view and modify its appearance in an intuitive WYSIWYG environment without having to first plot the drawing. You can create the plot stamp in your drawing template so that it is automatically included in any new drawings that you create. The field values automatically update to display data based on the new drawing. You can even copy the plot stamp into an existing drawing with the assurance that the field data will update accordingly.
- In AutoCAD, open the drawing (DWG) or template (DWT) to which you want to add a plot stamp.
- Create a new Mtext object.
- In the Mtext editor create any labels that you want to include in your plot stamp. For example, you might want a label for the drawing file name, plot date, plot device, named page setup, and who plotted the drawing. Creating labels is optional. You may choose to insert field data without preceding text.
- After each label, right-click in the Mtext editor and choose Insert Field.
- In the Field dialog box, select a field category and a field name.
The field category and field name that you choose depends on the data that you want to display. The drawing file name field is in the Documents field category but all of the plot-specific fields are in the Plot field category. If you want to display the plot date, for example, select the Plot field category and the PlotDate field name. Depending on the field that you choose, you may have the option to select from various formats such as month/day/year or year-month-day. If you are using sheet set functionality, you might want to include SheetSet fields such as the name of the sheet set to which this drawing belongs.
When you exit the Field dialog box, the field value appears in the Mtext editor. If the field cannot be evaluated, it will display dashes “----“. For example, AutoCAD can’t evaluate the PlotDate field until the drawing is actually plotted. After you insert your fields in an Mtext object, you can modify their appearance using typical editing features. You can change a field by double-clicking on it and choosing an alternate one from the Field dialog box.
You can use fields to display information about a selected object. For example, you can display the diameter of a circle or the area of hatch. When you edit those objects, the field values update to reflect the changes in geometry.
- Open the drawing to which you want to add the object field.
- Access the Field dialog box by using the Field command (this will create a field within an Mtext object) or by right-clicking within a table cell, text object, or attribute.
- In the Field dialog box, select the Objects field category. Notice there are various types of object fields to select from including named objects such as layers, views, etc.
- If you want to display field data for a graphical object in the drawing (like a hatch), select the Object field name.
- Choose the Select Object button and select the object for which you want to display field data. Depending on the type of object you select, various properties will be listed in the Field dialog box.
- Select the property, specify the format and choose OK. If you used the Field command to access the field dialog box, you will need to specify the location for the new field data. If you used any other method to access the field dialog box, you should see the new field data displayed in the existing object.
One of the most powerful uses of fields is in combination with sheet set functionality. You can use fields to automate the data in view labels, callout blocks, and title blocks by managing that data from a central location within the project’s sheet set.
For more information on using Fields with sheet sets, refer to the Sheets Happen! series and these posts in particular: