8.1.1 Fields in text
Text objects can include values that depend on the drawing. This feature is called “Text Fields” and they have the advantage that the data they present depends on the characteristics of the objects or parameters to which they are associated, so they can be updated if they change. In other words, for example, if we create a text object that includes a field that has the area of a rectangle, the value of the area shown can be updated if we edit that rectangle. With the text fields we can thus display a huge amount of interactive information, such as the name of the drawing file, the date of its last edition and many more.
Let's look at the procedures involved. As we know, when creating a text object, we indicate the insertion point, the height and the angle of inclination, then we begin to write. At that time we can press the right mouse button and use the "Insert field ..." option from the context menu. The result is a dialog box with all possible fields. Here is an example.
This is a convenient way, practically at hand, to create lines of text combined with text fields. However, it is not the only way. We can also insert text fields using the “Field” command, which will open the dialog box directly using the last values of text height and inclination. Alternatively, use the "Field" button in the "Data" group of the "Insert" tab. However, the procedure does not vary much.
In turn, to update the values of one or more text fields in a drawing, we use the "Update Field" command or the "Update Fields" button of the "Data" group just mentioned. In response, the command line window asks us to indicate the fields to update.
It should be noted, however, that we can modify the way in which Autocad performs the updating of the fields. The system variable "FIELDEVAL" determines this mode. Its possible values and the update criteria that correspond to it are presented in the following table:
The parameter is stored as a binary code using the sum of the following values:
0 Not Updated
1 Updated on Open
2 Updated when saving
4 Updated when plotting
8 Updated using ETRANSMIT
16 Updated to regenerate
31 Manual update
Finally, fields with dates must always be updated manually, regardless of the value of “FIELDEVAL”.