AUTOCAD • ANNOTATION AND DOCUMENTATION

Fields for Automatic Values — Use fields in text/tables for automatic values (intro)

Embed dynamic, self-updating metadata into your drawings so annotations stay accurate without manual edits.

Historical Context & Motivation

Engineering drawings have always carried metadata beyond geometry—title blocks, revision dates, author names, scale factors, and sheet counts. Before CAD systems existed, drafters maintained this information by hand, carefully erasing and re-lettering whenever a project evolved. When AutoCAD digitized the drafting process in the early 1980s, annotations became editable text objects, but they were still static strings that required manual updates. A single missed edit—say, forgetting to update the date after a revision—could propagate errors through an entire document set, a scenario familiar to anyone who has debugged a system where state is duplicated rather than referenced.

1982
AutoCAD 1.0 Released
Autodesk ships AutoCAD 1.0, introducing digital drafting with static text entities. All annotation values must be typed and updated manually—mirroring the paper workflow.
1997
AutoCAD 14 — Attributes in Blocks
Block attributes allow limited data embedding in title blocks, but values are still entered once and not automatically refreshed when underlying properties change.
2005
AutoCAD 2005 — Fields Introduced
Autodesk introduces Fields—dynamic placeholders inside MTEXT, attributes, and table cells that evaluate to current drawing data at plot time or upon manual regeneration. This marks the shift from static to reactive annotation.
2008
AutoCAD 2008 — Table Enhancements
Tables gain deeper field integration: cells can reference object properties, sheet-set metadata, and system variables, enabling BOM-like functionality directly in the DWG file.
2020+
Modern Field Ecosystem
Contemporary AutoCAD supports fields across MTEXT, dimensions, block attributes, and table cells, with categories spanning dates, documents, objects, sheet sets, and user-defined LISP expressions.

The core problem Fields solve is one computer scientists recognize immediately: data duplication leads to inconsistency. Rather than storing the same piece of information in multiple static strings, Fields act as live references—pointers, if you will—that resolve to their source value at evaluation time. The question becomes: how do we insert, configure, and manage these dynamic references so that our drawings remain a single source of truth?

Core Principles & Definitions

A Field in AutoCAD is a special text fragment that contains an instruction rather than a literal value. When the drawing regenerates, plots, or is explicitly updated, each Field evaluates its instruction and renders the current result as visible text. The underlying instruction is encoded in a field expression—a format code string stored in the DWG database—while the displayed text is merely a cached snapshot. Think of it as lazy evaluation: the expression is stored, and the rendered value is computed on demand.

1

Field Expression

The encoded instruction stored inside the MTEXT or table cell. It specifies the data source (e.g., system variable, object property, date) and a format mask that controls how the resolved value appears.
2

Field Category

Fields are organized into categories: Date & Time, Document, Objects, Plot, Sheet Set, and Other. Each category exposes a different namespace of data sources—analogous to modules in a software library.
3

Field Update Trigger

Fields re-evaluate on specific events: REGEN, PLOT, SAVE, ETRANSMIT, or manual UPDATEFIELD. The FIELDEVAL system variable (a bitmask) controls which triggers are active—giving users fine-grained control over update frequency.
4

Gray Background Indicator

By default, Fields display with a gray background on-screen to distinguish them from static text. This background does not print. The FIELDDISPLAY system variable toggles this visual cue on or off.
5

Host Objects

Fields can be inserted into MTEXT objects, block attributes (ATTDEF/ATTRIB), dimension text overrides, table cells, and multileader content. Note that single-line TEXT (DTEXT) does not natively support Fields in the same way as MTEXT; MTEXT, table cells, and block attributes are the primary and reliably supported host objects.
KEY TAKEAWAY
A Field is to static text what a pointer or reference is to a copied value in programming. Instead of embedding a literal string like "2025-01-15", you embed an instruction that says "evaluate the current date at render time." Just as dereferencing a pointer always yields the current contents of memory, evaluating a Field always yields the current state of its data source. This indirection eliminates the class of bugs caused by stale, duplicated values.

Visual Explanation — Field Lifecycle

The following diagram illustrates the lifecycle of a Field from insertion to display. Understanding this pipeline clarifies why Fields sometimes appear stale (the cached value hasn't been re-evaluated) and how the FIELDEVAL bitmask governs refresh behavior.

The lifecycle begins when the user inserts a Field (step 1) and configures its category and format (step 2). The field expression is stored in the DWG database (step 3) and an initial cached value is displayed (step 4). Subsequent trigger events—governed by the FIELDEVAL bitmask (step 5)—cause the expression to re-evaluate (step 6) and update the displayed text (step 7).

Notice how the trigger step acts as an event dispatcher. The FIELDEVAL system variable is a bitmask where each bit corresponds to an event type: bit 0 (value 1) = OPEN, bit 1 (value 2) = SAVE, bit 2 (value 4) = PLOT, bit 3 (value 8) = ETRANSMIT, bit 4 (value 16) = REGEN. The AutoCAD default value of 31 enables bits 0–4 (OPEN + SAVE + PLOT + ETRANSMIT + REGEN: 1+2+4+8+16 = 31). If you set FIELDEVAL to 0, Fields freeze and behave like static text—useful when you want to lock a snapshot value.

How Fields Work — Under the Hood

AutoCAD Fields are not mathematical formulas in the traditional sense, but they do follow a structured evaluation model that computer scientists will find familiar. Internally, a Field is stored as a field code string embedded within the host object's extended data. This string contains the field type identifier, the data source reference (which could be an object handle, a system variable name, or a LISP expression), and a format specifier. When an update trigger fires, AutoCAD's field evaluator parses this string, resolves the reference, applies the format, and writes the result into the text cache.

Field Code Structure

FIELD CODE ANATOMY
%<\AcVar FieldType \f "FormatString">%
The delimiters %< and >% mark the beginning and end of a field expression. \AcVar specifies the evaluator class (e.g., AcVar for system variables, AcObjProp for object properties). The \f switch introduces the format string that controls decimal places, date patterns, and text casing.
EXAMPLE — CURRENT DATE FIELD
%<\AcVar Date \f "MM/DD/YYYY">%
This expression tells AutoCAD to query the system date, then format it using month/day/year notation. On January 15, 2025, this would render as 01/15/2025.
EXAMPLE — OBJECT PROPERTY FIELD
%<\AcObjProp Object(%<\_ObjId 2130079768>%).Area \f "%lu2%pr2">%
Here, \AcObjProp requests the Area property of the object identified by handle 2130079768. The format %lu2%pr2 specifies decimal units with two decimal places. If the polyline's area changes, this Field automatically reflects the new value.

FIELDEVAL Bitmask Breakdown

FIELDEVAL BITMASK
FIELDEVAL = Σ 2ⁱ for each enabled trigger i ∈ {0..4}
Bit 0 (value 1) = OPEN; Bit 1 (value 2) = SAVE; Bit 2 (value 4) = PLOT; Bit 3 (value 8) = ETRANSMIT; Bit 4 (value 16) = REGEN. The AutoCAD default value of 31 = 1 + 2 + 4 + 8 + 16, which activates all five triggers (OPEN, SAVE, PLOT, ETRANSMIT, and REGEN). Setting FIELDEVAL to 0 disables all automatic updates.
💡 CS Analogy: Reactive Programming
If you're familiar with reactive frameworks (e.g., React state, RxJS observables, or even spreadsheet cells), Fields follow the same paradigm. The field expression is a computed property that depends on an observable source. The FIELDEVAL bitmask is the subscription filter that determines which events trigger re-computation. Stale display values are simply a cache that hasn't been invalidated yet.

Field Categories & Common Use Cases

AutoCAD organizes Fields into several categories, each exposing a different namespace of data sources. Understanding these categories is essential for selecting the right Field type for a given annotation task. The diagram below maps each category to its typical use cases and the type of data it exposes.

The five primary Field categories—Date & Time, Document, Objects, Sheet Set, and Other/Plot—branch from the FIELD command dialog. Below them, the five most common host object types illustrate where Fields can be embedded within a drawing.
Field categories with representative data sources, typical placements, and example rendered outputs.
CategoryData SourcesTypical PlacementExample Output
Date & TimeCreateDate, SaveDate, PlotDate, Date (current)Title block revision date, plot stamps01/15/2025
DocumentFileName, FilePath, FileSize, Author, Title, SubjectTitle block drawing name, file reference notesFloorPlan-A101.dwg
ObjectsArea, Length/Perimeter, Layer, Color, Position, custom propertiesRoom area labels, pipe length schedules245.50 sq ft
Sheet SetSheetNumber, SheetTitle, SheetSetName, custom propertiesTitle blocks linked to SSM, sheet indicesSheet A-101
Other / PlotPlotScale, DeviceName, PaperSize, LISP expressions, system variablesScale indicators, plotter stamps, computed values1:50

Worked Example — Building a Self-Updating Title Block

In this example, we will create a title block attribute that automatically displays the current file name and the date of the last save—eliminating two of the most commonly forgotten manual updates in production drawings.

Insert Dynamic FileName and SaveDate Fields into a Title Block
1
Step 1 — Open the Block EditorDouble-click your title block reference (or type BEDIT and select the title block definition). This opens the Block Editor environment where you can modify attribute definitions.
2
Step 2 — Select the Drawing Name AttributeDouble-click the ATTDEF (attribute definition) labeled "DWG_NAME" to open the Enhanced Attribute Editor. Clear any existing default value. Position your cursor in the Default field and right-click, then choose Insert Field from the context menu to launch the Field dialog. (In some AutoCAD versions and UI configurations, Ctrl+F may also open the Field dialog, but the right-click context menu method is the most consistently available approach across versions.)
3
Step 3 — Configure the FileName FieldIn the Field dialog, set the Field category dropdown to "Document". In the Field names list, select Filename. Under Format, choose Filename only (excludes path and extension) or leave the full path if desired. Click OK to insert the field expression into the attribute default.
Field expression inserted: %<\AcVar Filename \f "%fn1">%
4
Step 4 — Add a SaveDate Field to the Date AttributeNow double-click the "LAST_MODIFIED" attribute. Open the Field dialog again. Set the category to "Date & Time" and select SaveDate. Choose the date format M/d/yyyy from the format examples. Click OK.
Field expression inserted: %<\AcVar SaveDate \f "M/d/yyyy">%
5
Step 5 — Save the Block and TestClick "Close Block Editor" and save changes. Back in model or paper space, your title block now shows the current file name and the last save date. Save the drawing (Ctrl+S) and run REGEN to see the Fields update to current values. Try renaming the file with Save As—the FileName Field automatically reflects the new name.
Title block now displays: DWG_NAME = FloorPlan-A101, LAST_MODIFIED = 1/15/2025
🔧 Pro Tip: Fields in Table Cells
To insert a Field into a table cell, double-click the cell to enter edit mode, then right-click and choose Insert Field from the context menu. This is especially powerful for schedules: create a table where each row references a different polyline's Area property. When the geometry changes, the schedule updates automatically—no manual re-measurement needed.

Strengths, Limitations & Comparisons

Fields are a powerful automation tool, but like any abstraction they come with trade-offs. Understanding when to use Fields versus static text—or when to reach for a more advanced solution like data extraction or LISP routines—requires weighing their strengths against their limitations.

Strengths and limitations of AutoCAD Fields for automatic annotation values.
AspectStrengthsLimitations
Data ConsistencySingle source of truth—eliminates copy-paste errors across multiple annotations referencing the same property.Fields display a cached value between updates, which may temporarily show stale data if FIELDEVAL is restricted.
MaintenanceNo manual edits needed when file names, dates, or geometry change—reduces revision overhead.If the source object is deleted, the Field shows "####" (broken reference). Debugging requires identifying the orphaned field expression.
PortabilityFields travel with the DWG file—no external dependencies for document-level fields (Date, FileName).Sheet Set fields require the .dst file to be accessible. Object fields use internal handles that break if the referenced object is in an XREF that is unloaded.
ComplexityGUI-based insertion via the Field dialog requires no programming knowledge. LISP-based field expressions enable custom computations.Advanced field expressions (nested fields, LISP) have opaque syntax. The raw field code is difficult to read and debug without documentation.
PerformanceLightweight—each field is just a string expression. Hundreds of fields have negligible impact on file size.In drawings with thousands of Object-type fields, REGEN time can increase noticeably as each field queries the database for its source object.
KEY TAKEAWAY
Fields occupy a sweet spot between fully static text and heavyweight external automation (LISP scripts, data-linked spreadsheets, or BIM-level parametric engines). They are best suited for document-level metadata and moderate-volume object property references. For large-scale data extraction—such as generating a complete bill of materials from hundreds of block attributes—consider the DATAEXTRACTION command or a database link, which are purpose-built for batch queries. Fields remain ideal for the "last mile" of annotation: ensuring that what the user sees on the plotted sheet accurately reflects the current state of the drawing.

Connection to Advanced Topics

Fields are an introductory mechanism in a broader ecosystem of dynamic data management within AutoCAD and related Autodesk products. Understanding where Fields fit—and where they hand off to more powerful systems—provides a roadmap for deeper exploration.

Comparison of AutoCAD Fields with more advanced data management mechanisms.
FeatureFields (This Lesson)Advanced Alternative
Data SourceSystem variables, object properties, document metadata, datesData Links connect table cells directly to Excel spreadsheets for bidirectional data exchange
AggregationOne field references one source value—no aggregation or filteringDATAEXTRACTION wizard queries multiple objects, filters by property, and outputs structured tables or CSV files
ComputationFormat masks and basic LISP expressions within field codesFull AutoLISP or .NET API routines can perform arbitrary computation and write results back to drawing entities
Multi-drawing scopeSheet Set fields span drawings within a .dst, but individual fields are DWG-scopedBIM platforms (Revit) maintain a parametric database across the entire project model, with schedules as live views
Update ModelEvent-triggered (FIELDEVAL bitmask)—pull-based evaluationReactor-based LISP and .NET event handlers provide push-based, real-time notification when objects change

As you progress, you will encounter nested fields (a field expression that contains another field as a sub-expression), formula fields within table cells (which combine field references with arithmetic operators like SUM and AVERAGE), and LISP-evaluated fields that execute arbitrary AutoLISP code at evaluation time. These advanced patterns transform Fields from simple property lookups into a lightweight scripting layer embedded directly in your annotations—much like moving from simple variable interpolation in a template engine to inline computed expressions.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain, using a software engineering analogy, why AutoCAD Fields are preferable to manually typing the file name into a title block attribute. What class of errors do Fields prevent?
PROBLEM 2BASIC CALCULATION
You want the FIELDEVAL system variable to trigger field updates only on SAVE and PLOT events. What integer value should you set FIELDEVAL to? Show your bitmask calculation.
PROBLEM 3INTERMEDIATE
You have a table in paper space with 10 rows, each displaying the area of a different room (closed polyline) in model space. Describe the process to populate these cells with Object-type Fields. What happens if you delete one of the source polylines, and how would you diagnose the problem?
PROBLEM 4APPLIED
A civil engineering firm uses a standard title block across 200 drawings managed in a Sheet Set. The project manager wants every title block to automatically display: (a) the sheet number, (b) the total number of sheets in the set, and (c) the project name. Which Field categories and specific field names would you use? Explain any external dependencies and potential failure modes.
PROBLEM 5CRITICAL THINKING
Compare AutoCAD Fields to computed properties in a reactive UI framework (e.g., Vue.js computed properties or React useMemo). In what ways does AutoCAD's pull-based evaluation model (FIELDEVAL triggers) differ from the dependency-tracking, push-based invalidation model used in modern reactive systems? What are the implications for data freshness, performance, and user experience in each paradigm?

Summary — Fields for Automatic Values

AutoCAD Fields are dynamic text placeholders that replace static, manually-typed annotations with live references to drawing data. They can be embedded in MTEXT, table cells, block attributes, and other text-hosting objects. Each Field stores a field expression that specifies a data source (drawn from categories like Date & Time, Document, Objects, Sheet Set, or Other) and a format mask that controls how the resolved value is displayed.

The FIELDEVAL bitmask governs when Fields re-evaluate—on open, save, plot, ETRANSMIT, or regen—giving users control over the balance between data freshness and performance. Fields are inserted via the right-click context menu's Insert Field option (or Ctrl+F in supported contexts) within any text editor, or through the FIELD command. They eliminate the data duplication problem by acting as live references rather than copied values—ensuring that title blocks, schedules, and annotations remain synchronized with the drawing's current state. For CS students, Fields can be understood as a lightweight reactive data-binding mechanism embedded directly in AutoCAD's annotation layer.

Varsity Tutors • AutoCAD • Fields for Automatic Values