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.

A drafting compass with dimension and drawing-panel symbols.
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

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?

SECTION 2

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.

SECTION 3

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.

Field Lifecycle: Insert → Store → Trigger → Evaluate → Render1. INSERTUser runs FIELDor Ctrl+F in editor2. CONFIGUREPick category, source,format mask3. STOREField expression savedin DWG database4. CACHEInitial value resolved& displayed5. TRIGGER EVENT (controlled by FIELDEVAL bitmask)REGEN (2)SAVE (4)PLOT (8)ETRANSMANUAL6. RE-EVALUATE ExpressionQuery data source → Apply format → Update cache7. DISPLAY Updated Value
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.

SECTION 4

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=Σ2iforeachenabledtriggeri∈0..4FIELDEVAL = Σ 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.

SECTION 5

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.

AutoCAD Field Categories OverviewFIELD CommandDate & Time• CreateDate• SaveDate• PlotDateMM/DD/YYYYDocument• FileName• FilePath• FileSizeTitle blocksObjects• Area• Length• LayerSchedulesSheet Set• SheetNumber• SheetTitle• SheetSetNameSheet mgmtOther / Plot• PlotScale• DeviceName• LISP ExpressionCustom logicCommon Host Objects for FieldsMTEXTNotes, labelsTABLE CellSchedules, BOMATTRIBTitle blocksMLEADERCalloutsDIMOverridesFields can be embedded in any text-accepting AutoCAD object
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.
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

Field categories with representative data sources, typical placements, and example rendered outputs.

SECTION 6

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. 1

    Step 1 — Open the Block Editor

    Double-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. 2

    Step 2 — Select the Drawing Name Attribute

    Double-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. 3

    Step 3 — Configure the FileName Field

    In 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. 4

    Step 4 — Add a SaveDate Field to the Date Attribute

    Now 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. 5

    Step 5 — Save the Block and Test

    Click "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.

SECTION 7

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.

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.

Strengths and limitations of AutoCAD Fields for automatic annotation values.

✦

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.

SECTION 8

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.

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

Comparison of AutoCAD Fields with more advanced data management mechanisms.

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.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

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?
Show answer
Fields act as references (or pointers) to a single source of truth, much like how a well-designed database normalizes data to avoid redundancy. When you manually type a file name into a title block, you create a duplicated copy of that information. If the file is renamed via Save As, the title block retains the stale name—a classic data consistency bug. Fields eliminate this by evaluating the current FileName at each update trigger, ensuring the displayed value always reflects reality. This is analogous to the DRY (Don't Repeat Yourself) principle in software engineering: store information once, reference it everywhere.

Question 2: BASIC 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.
Show answer
The FIELDEVAL bitmask assigns: bit 1 (value 2) = SAVE, bit 2 (value 4) = PLOT. To enable only these two triggers, compute the bitwise OR: 2 | 4 = 6. Therefore, set FIELDEVAL to 6. You can verify: 6 in binary is 00110. Bit 1 (SAVE) and bit 2 (PLOT) are both set to 1, while all other bits are 0. This means Fields will not update on OPEN, ETRANSMIT, or REGEN—only when the drawing is saved or plotted.

Question 3: INTERMEDIATE

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?
Show answer
For each cell: double-click the cell to enter edit mode, right-click and choose Insert Field, set the Field category to "Objects," click the object-selection button, switch to model space, and select the target polyline. Choose the "Area" property and set the format to the desired units and decimal precision. Repeat for all 10 rows. If a source polyline is deleted, the corresponding Field loses its reference (the internal object handle points to nothing) and displays "####" instead of a numeric value. To diagnose this, double-click the cell to inspect the field expression—it will still contain the now-invalid object handle. You can replace the broken field by inserting a new one that references a replacement polyline, or convert the cell to static text if the geometry is permanently removed.

Question 4: APPLIED

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.
Show answer
For the sheet number, use a Sheet Set category field with the field name "SheetNumber." For the total number of sheets, use "SheetSetCurrentSheetSetDescription" or a custom Sheet Set property if available; alternatively, a Diesel or LISP expression field could count sheets programmatically. For the project name, define a custom Sheet Set property (e.g., "ProjectName") in the Sheet Set Manager, then reference it via a Sheet Set category field. The critical dependency is the .dst (Sheet Set Data) file—all Sheet Set fields resolve by querying this external file. If the .dst is moved, renamed, or becomes inaccessible (e.g., on a disconnected network drive), all Sheet Set fields in every drawing will show stale cached values or "####". Mitigation includes keeping the .dst in a version-controlled, always-accessible location and ensuring FIELDEVAL includes the OPEN trigger so fields refresh when drawings are opened from the Sheet Set Manager.

Question 5: CRITICAL 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?
Show answer
In reactive UI frameworks, computed properties track their dependencies at runtime: when any dependency changes, the system automatically marks the computed value as dirty and re-evaluates it (push-based invalidation). This guarantees immediate data freshness—the UI always reflects the current state. AutoCAD Fields, by contrast, use a pull-based model: they only re-evaluate when a specific trigger event occurs (save, plot, regen), regardless of whether the underlying data has changed. This means Fields can display stale values between trigger events—a trade-off that favors performance over freshness in a drawing environment where hundreds of objects may change during an editing session. The reactive model incurs overhead in dependency tracking and can cause cascading re-renders; AutoCAD avoids this by batching updates to discrete events, which keeps interactive editing fast. However, this batching can confuse users who modify geometry and expect annotations to update immediately. A hybrid approach—push-based invalidation with lazy re-evaluation—would combine the benefits of both, but AutoCAD's architecture, rooted in a pre-reactive-programming era, was not designed with fine-grained dependency graphs in mind.

SUMMARY

Summary — Fields for Automatic Values

Summary

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