AutoCAD tutorial: Using Fields to make text dynamic

AutoCAD Fields can be added to various objects, including block attributes, tables, leaders, and dimensions, through the FIELD command.

AutoCAD Fields are dynamic text that update as a drawing changes. Use Fields to save time by removing manual updates. More importantly, Fields reduce errors and inconsistencies by ensuring the information always matches the current state of a drawing.

Fields link to dimensional information, coordinates, block attributes and object properties. Use Fields as placeholders, like Sheet Set Title. You can also track drawing file information like its name, path or various dates and times.

Add Fields to not only text but anywhere text is used. This includes block attributes, tables, leaders and dimensions.


Adding Fields

To add a Field, start the command from the command line (FIELD), ribbon or, in some versions, the right-click menu.

Any of these options launch the Field dialog.

Although not mandatory  there are a lot of Fields. I like to start by selecting a Field category corresponding to the type of information I want to add. This makes it quicker to then choose the specific Field type I want to insert.

With the Field type selected, set the desired properties. The properties vary by type and you may need to provide more information, like selecting an object to reference.

The Field Expression lists the Field’s underlying expression. It is not editable but this can help explain what the Field is, how it is constructed and its inner workings.

Click OK to add the Field into your drawing and pick the insertion location. The result is MText with the Field inserted. You can edit the content and style just as you would any other MText object. AutoCAD indicates the Field with a gray background. This background does not plot or export.

When building an attribute definition, use Insert Field to insert a Field as all or part of the attribute value. Not all Field types are available for use within blocks; however, the ones available behave as Fields and will update with changes to the drawing.

Note that there are times when the Field does not populate. Here are two examples. One is because the drawing has never been saved, hence the Save Date is blank. Second is because the Comments drawing property box is empty.

You will see pound signs (####) with invalid entries. For example, this will occur if you insert the CurrentSheetProjectName Field into the model space because it is only valid in the paper space.

Adding to Fields to text

You can also add Fields directly into text objects. Regardless of how you add the Field, the result will be text.

With the MText Editor, select Field from the contextual ribbon tab. With single-line text (DText), find Insert Field on the right-click menu.

You can add multiple Fields to a single text object and surround the Field with static text.

As with single-line text, find the Insert Field feature with block attributes on the right-click menu.

Updating Fields

The best part about Fields is how they update automatically. Fields update when you open or save a drawing. This occurs when you use the Regen command and before you print or plot a drawing.

You can also manually update the Field using UPDATEFIELD. Or you can right-click on the Field within the text editor and select Update Field.

The Date Field is static by design and never updates automatically. It is one case where you must manually update the Field.

Control this update behavior with the FIELDEVAL system variable. When set to 0, Fields only update when you open or save a drawing. When set to 1, Fields update when a drawing is opened or saved and when a drawing is regenerated. Set it to 2 when you want Fields to update when you open, save, regenerate and plot. And finally, set it to 3 for Fields to update continuously as you work with a drawing.

You can also manage the update behavior from the Options dialog (the User Preferences tab). Additionally, if you do not like the gray background applied to Fields, you can turn it off.

Editing Fields

To edit a Field, you must edit the text object the Field is contained in. Then right-click on it within the editor and select Edit Field.

The Field within the text behaves as other characters. You can change its style, formatting and other paragraph settings.

You can also convert the Field into static text via a right-click option.

Types of Fields

The Field category names should be self-explanatory based on what they do. How the Field types behave and how you configure them does differ between these categories.

The Date & Time Fields are just that—the date and time of various events that occur in AutoCAD. You can add the drawing creation date, the last time it was plotted and the last time the drawing was saved. The Date Field is a static Field that inserts the current date and time.

With the Date & Time Fields, you set the format. You can select from preconfigured examples, or you can use the Date format to manually set the desired format. The format is in any combination of year, month, date and time.

The Plot Fields are all about plotting and printing. This includes when a drawing was last plotted and the current layout’s plot configuration.

The Document Fields are drawing properties that are text information like the Title, Subject and Author, as well as drawing file information like the file size.

Use the Sheet Set Field to add details about a sheet set. The Field dialog defaults to the active sheet set, but you can pick from the recently used list or you can browse for a different set. Use the Sheet navigation tree to select the desired sheet and then select the formatting and property to insert as a Field.

The Current prefixed types add details about the active sheet. These are properties like the description, number and title. You select the format and set the case types. For example, you can choose to have the text be in all uppercase letters.

SheetSetPlaceholders are intended for blocks to create dynamic labels, callouts and other annotations. You add these Fields so that they take on the details of the active set or sheet. When inserting the block, AutoCAD replaces the placeholder with the actual information.

By selecting NamedObject, you subsequently need to select the Named object type. The dialog lists all objects of the selected type. You can then insert the name, in the desired case, as a Field.

With Object, use the Select Object button to temporarily close the dialog and select an object in the drawing. The Field dialog then lists the properties available to insert as a Field. The property list is dependent on the type of object selected. This list will be like what is presented in the Properties palette. For example, a line lists length, a circle includes the diameter and radius, and a block instance includes its current position.

The formatting is dependent on the selected property. You will set the case, unit format or, in some instances, the units.

BlockPlaceholder Fields are for dynamic blocks specifically and only for insertion in block Attribute Definitions. When inserting an instance of the dynamic block into a drawing, AutoCAD replaces the place holder with the actual value of the corresponding block property.

Use these to display properties of the block instance. For example, you can use this when creating dynamic labels that automatically reflect the current state of the block.

A Formula Field is just that, a place for creating formulas based on the values in table cells. You can insert these Fields as stand-alone text or into table cells. The options include basic math (addition, subtraction, multiplication and division) and functions for Average, Sum, Count and Cell. Use Cell when you want to extract the value of a selected cell into your formula.

As the result is numeric, you specify the precision.

Count and CountInArea are special Fields and are added to drawings with a different workflow. These Fields count the total instances of a selected object.

To insert a Count Field, right-click on one instance of the type of object you want to count and select Count Selection. From the Count toolbar, select Insert Count Field. As with all Fields, counts automatically update as you add or remove instances of the object from the drawing.

Adding Fields to tables (and other objects)

To insert a Field into a table, edit the cell (double-click it) and from the ribbon select Field.

The Field and Formula right-click options also insert Fields into a selected cell.

Unless the content is set to Block, the text associated with multi-leaders is MText, meaning you can insert Fields as with all MText.

You can also edit dimension text with the MText editor. This also means you can easily add Fields to dimensions.