AUTOCAD • ADVANCED EDITING AND PRODUCTIVITY

Array Item Replacement — Replace items in an array; understand associative vs non-associative arrays (conceptual)

Master the art of selectively replacing individual elements within AutoCAD arrays while preserving parametric relationships.

Historical Context & Motivation

AutoCAD's array functionality has undergone a significant transformation since the software's earliest releases. In the original implementations, creating a rectangular or polar pattern of objects produced a collection of entirely independent copies—each one a standalone entity in the drawing database with no memory of the pattern that generated it. If a designer needed to swap one column in a row of bolts for a different fastener type, the process was purely manual: delete the old copy, insert the new block, and reposition it by hand. This workflow became increasingly untenable as architectural and mechanical drawings grew in complexity, sometimes containing thousands of arrayed components across dozens of layers. The demand for a smarter, pattern-aware array drove Autodesk to reimagine the entire array paradigm, culminating in the associative array architecture introduced in AutoCAD 2012. Understanding how we arrived at this capability—and what distinguishes it from the legacy approach—provides essential context for mastering array item replacement.

1982
AutoCAD 1.0 Released
The inaugural release introduced the ARRAY command, which could create rectangular and polar patterns but produced only independent, non-linked copies of the source object.
2006
Dynamic Blocks Introduced
AutoCAD 2006 introduced dynamic blocks with parametric grips, foreshadowing the concept of geometry that 'remembers' its construction constraints and can be modified in-place.
2012
Associative Arrays Debut
AutoCAD 2012 overhauled the ARRAY command, producing associative arrays that behave as unified, parametrically linked groups. Users could now modify spacing, count, and source objects with grip-based editing.
2013
ARRAYEDIT & Item Replacement
AutoCAD 2013 refined the associative array workflow with the ARRAYEDIT command and the ability to replace individual items within an array—enabling per-element customization without breaking the pattern's parametric backbone.
2020+
Modern Refinements
Subsequent releases improved performance for large arrays, added contextual ribbon tabs, and tightened integration with AutoLISP and .NET APIs, allowing programmatic item replacement and batch operations across array instances.

The central question that array item replacement addresses is deceptively simple: how can a designer maintain the regularity of a pattern while introducing local variations? Consider a façade of identical window units where one bay must accommodate a door, or a PCB footprint where certain via positions require a different pad geometry. Before associative arrays, such modifications required either abandoning the array entirely or painstakingly managing independent copies. The modern solution—selective item replacement within an associative array—elegantly preserves the pattern's parametric integrity while granting per-element control.

Core Principles & Definitions

Before diving into the mechanics of replacing items, it is essential to establish a precise vocabulary. AutoCAD's array system distinguishes between two fundamentally different object models that share the same visual appearance but differ dramatically in their internal data structures and editing affordances. Grasping these definitions is the prerequisite for understanding when and how replacement operations are possible.

1

Associative Array

A single compound entity in the drawing database that stores the source object, pattern parameters (rows, columns, levels, spacing), and per-item overrides. Modifying the source propagates to all non-overridden items. Supports item replacement natively.
2

Non-Associative (Exploded) Array

A collection of independent copies that share no parametric link. Produced by the legacy ARRAY command (pre-2012) or by explicitly exploding an associative array. Each copy must be edited individually; there is no centralized 'replace item' operation.
3

Source Object

The original geometry from which all array items are derived. In an associative array, changes to the source automatically ripple through every item that has not been individually overridden or replaced.
4

Item Override

A per-element modification—such as deletion, repositioning, or replacement—applied to a specific index within the associative array. Overrides are stored as metadata on the array entity and persist through subsequent edits to the base pattern.
5

ARRAYEDIT Command

The command-line and ribbon interface for modifying an existing associative array. Sub-options include REPlace, DELete, RESet, and SOurce editing.
KEY TAKEAWAY
Think of an associative array as a spreadsheet where every cell references the same formula. Replacing an item is like overriding a single cell with a hardcoded value—the rest of the sheet still updates automatically when you change the formula, but that one cell retains its custom content. A non-associative array, by contrast, is like a printed copy of the spreadsheet: each 'cell' is just ink on paper with no formula behind it, so changes must be made one by one.

Visual Explanation — Associative vs. Non-Associative Arrays

Left: an associative array where item [1,3] (labeled R) has been replaced with alternate geometry while all other items (labeled S) remain linked to the source. Right: a non-associative array consisting of eight independent copies (C₁–C₈) with no parametric backbone. Notice how the replaced item in the associative array retains its position within the pattern's grid, stored as an override in the entity's metadata.

The diagram above crystallizes the fundamental architectural difference. On the left, the associative array is a single entity in the drawing database that internally references one source object and stores a table of per-item overrides. When the source geometry changes—say, the square block becomes circular—every item labeled S updates automatically, while the replaced item R remains untouched. On the right, the non-associative array is nothing more than a flat collection of geometry; modifying one copy has zero impact on the others. This distinction is not merely theoretical—it directly determines which editing commands are available, how file size scales, and whether downstream modifications remain tractable.

How Array Item Replacement Works

Array item replacement in AutoCAD operates through a well-defined command sequence that modifies the internal override table of an associative array entity. The process can be initiated either from the contextual ribbon tab that appears when an associative array is selected, or via the command line using ARRAYEDIT. Understanding the underlying data model clarifies why certain operations are permitted and others are not.

The Override Table Model

Internally, an associative array stores each item's position as an index tuple. For a rectangular array, this tuple takes the form (row, column, level), where level refers to the Z-axis repetition in 3D arrays. For a polar array, the index is (item_number, level), and for a path array, it is (item_along_path, row, level). The override table maps specific index tuples to replacement objects, deletion flags, or positional offsets. When AutoCAD regenerates the array's visual representation, it iterates through every valid index, checks the override table, and renders either the default source object or the override.

RECTANGULAR ARRAY INDEX
Position(i, j, k) = Base + (i × RowSpacing) + (j × ColSpacing) + (k × LevelSpacing)
Where i = row index (0-based), j = column index, k = level index, and Base = the insertion point of the source object. The override table may map any (i, j, k) to alternate geometry.
POLAR ARRAY INDEX
θ(n) = StartAngle + n × (FillAngle / (TotalItems − 1))
Where n = item index (0 to TotalItems − 1), FillAngle = the angular span, and each item can be independently replaced at any index n.

Command Workflow

  1. Select the array: click any item in the associative array to select the entire entity. The contextual Array tab appears on the ribbon.
  2. Enter ARRAYEDIT or click Replace Items on the ribbon. AutoCAD enters array-editing mode.
  3. Select items to replace: click one or more individual items within the array. Selected items highlight.
  4. Specify the replacement object: select an existing object or block in the drawing that will substitute the original source at the chosen indices.
  5. Confirm and specify base point: define the insertion base point on the replacement object so that it aligns correctly with the array grid.
Important Constraint
Item replacement is available only on associative arrays. If the ARRAYASSOCIATIVITY system variable is set to 0, or if an array has been exploded, the replacement workflow is inaccessible. You can check associativity by selecting the array and inspecting the Properties palette—look for the Associative property set to Yes.

Associative vs. Non-Associative — A Detailed Classification

The distinction between associative and non-associative arrays extends far beyond item replacement. It touches on file size, editing flexibility, interoperability, and scripting capabilities. The following table and diagram provide a systematic comparison that informs workflow decisions in real-world projects.

Comprehensive comparison of associative vs. non-associative array behaviors in AutoCAD.
PropertyAssociative ArrayNon-Associative Array
Entity TypeSingle compound entity (AcDbAssocArrayActionBody)Collection of independent entities (lines, arcs, blocks, etc.)
Parametric EditingYes — grips, Properties palette, ARRAYEDITNo — each copy is manually edited
Item ReplacementSupportedNot supported
File SizeCompact — stores source + parameters + overridesLarger — full geometry stored per copy
Source PropagationChanges to source update all non-overridden itemsNo propagation — copies are independent
DXF/InteroperabilityMay require proxy handling in non-Autodesk softwareUniversally compatible — standard entities
EXPLODE BehaviorConverts to non-associative; overrides become independent geometryAlready exploded — further EXPLODE decomposes blocks/groups
This flowchart illustrates the decision process for replacing items in an AutoCAD array. The critical gate is the associativity check: only arrays with Associative = Yes support the ARRAYEDIT → REPlace workflow. Non-associative arrays require manual deletion and reinsertion of geometry. Note how the override table (shown at left) records replacements as index-to-object mappings within the array entity's metadata.

From a computer science perspective, the associative array in AutoCAD shares a conceptual kinship with the prototype pattern in software design: a single prototype (the source object) is cloned across the array, and individual clones can override specific properties without affecting the prototype itself. The override table functions analogously to a dictionary keyed by index tuples—making the 'associative' label doubly appropriate, as it echoes the associative-array (hash map) data structure that CS students encounter in algorithms courses. However, it is important not to conflate AutoCAD's usage of 'associative' with the data-structure term: in AutoCAD, associativity refers to the parametric link between the array and its source, not to key-value pair semantics.

Worked Example — Replacing a Window Unit in a Building Façade

Consider a building façade modeled in AutoCAD where a 4-row × 8-column rectangular associative array of a standard window block ("WIN-STD") has been created. The architect now requires that position (2, 5)—the third row, sixth column (0-indexed)—be replaced with a door block ("DOOR-ENTRY") while maintaining the overall grid spacing and parametric link for all other windows.

Replacing a Single Array Item
1
Step 1 — Verify AssociativityClick on any window in the array to select the entire entity. Open the Properties palette (Ctrl+1) and confirm that the Associative property reads Yes. Also note the current values: Rows = 4, Columns = 8, Row spacing = 4000, Column spacing = 3000. If associativity were set to No, you would need to recreate the array or fall back to manual editing.
Associative = Yes ✓
2
Step 2 — Enter ARRAYEDIT ModeWith the array selected, type ARRAYEDIT at the command line and press Enter. AutoCAD responds with: Enter an option [Source/REPlace/RESet/DELETE/FILL/REstoreall]: Type REP and press Enter to invoke the Replace sub-option.
Replace mode active
3
Step 3 — Select the Target ItemAutoCAD prompts: Select array items to replace: Click on the window at grid position (2, 5). The selected item highlights. Press Enter to confirm the selection.
Item (2,5) selected
4
Step 4 — Specify Replacement ObjectAutoCAD prompts: Select a replacement object: Click on the DOOR-ENTRY block reference that has been pre-inserted elsewhere in the drawing. Then specify the base point on the door block—typically its lower-left insertion point—to control alignment within the grid cell.
Replacement object = DOOR-ENTRY
5
Step 5 — Confirm and InspectPress Enter or Escape to exit ARRAYEDIT. The window at position (2, 5) is now replaced by the door block. Selecting the array and checking Properties confirms that the array still reports 4 × 8 = 32 items, but position (2, 5) carries an override. You can verify by re-entering ARRAYEDIT and choosing RESet to restore the original source at any overridden position, confirming the replacement is non-destructive.
Replacement complete — 31 windows + 1 door, all parametrically linked
💡 Pro Tip
You can replace multiple items simultaneously by selecting several array items before specifying the replacement object. Additionally, you can perform multiple replacement passes—for example, replacing positions (0,0) and (3,7) with a corner column block while replacing (1,4) with a door—by running ARRAYEDIT → REPlace multiple times. Each replacement is stored as an independent override.

Strengths, Limitations & Trade-offs

Strengths and limitations of the array item replacement workflow in AutoCAD.
AspectStrengthLimitation
Parametric IntegritySource changes propagate to all non-overridden items automatically, ensuring consistency across hundreds of elements.Replaced items are decoupled from the source; they will not update when the source changes, potentially causing design drift if the replacement block is not maintained.
Editing FlexibilityIndividual items can be replaced, deleted, or reset without affecting the rest of the pattern. Multiple replacement objects can coexist in a single array.Only associative arrays support replacement; legacy drawings or interop formats (e.g., DXF for non-Autodesk software) may require exploding first, forfeiting the feature.
File SizeAssociative arrays store geometry once plus lightweight parameter/override data, resulting in significantly smaller files for large patterns.Replacement objects add to the override table; very many replacements can partially negate the file-size advantage, though still more efficient than fully independent copies.
API / AutomationAutoLISP and .NET APIs expose array parameters and override tables, enabling programmatic batch replacement across multiple arrays.The API surface is complex; modifying override tables programmatically requires careful handling of AcDbAssocArrayActionBody entities and can be error-prone without thorough documentation.
Undo / ResetThe RESet option in ARRAYEDIT restores any overridden item to the original source object, providing non-destructive editing.Once an array is exploded (EXPLODE command), all override metadata is permanently lost and cannot be recovered.
KEY TAKEAWAY
Array item replacement is analogous to object-oriented inheritance with method overriding: the array's source object serves as the base class, and each replaced item is like a derived class that overrides a specific behavior. The override is local and reversible (akin to removing the override and falling back to the base implementation), but once you 'flatten' the hierarchy (explode the array), all inheritance is lost. In practice, this means you should delay exploding arrays as long as possible in your design workflow—treat associativity as a form of design debt that, once repaid by exploding, cannot be reinstated.

Connections to Advanced Theory & Workflows

Array item replacement does not exist in isolation—it connects to several advanced AutoCAD concepts and broader CAD theory. Understanding these connections positions you to leverage arrays in sophisticated multi-discipline workflows, from parametric façade design to automated manufacturing drawings.

Mapping array item replacement concepts to advanced AutoCAD and CAD workflows.
This ConceptAdvanced Extension
Item replacement in rectangular/polar/path arraysParametric constraints + arrays: combining dimensional/geometric constraints with associative arrays enables fully parametric models where both spacing and item geometry respond to design parameters.
Manual replacement via ARRAYEDITProgrammatic replacement via AutoLISP / .NET: batch-replace items across multiple arrays using scripts. The acDbAssocArrayParameters API exposes override tables for read/write access.
Associative vs. non-associative distinctionData extraction & scheduling: associative arrays enable accurate counts and schedules (e.g., '31 × WIN-STD, 1 × DOOR-ENTRY') because the override table is queryable. Non-associative arrays require manual counting or LISP-based filtering.
2D array item replacement3D array levels: the level parameter extends arrays into the Z-axis, and item replacement applies at any (row, column, level) tuple—enabling, for example, replacing a standard floor plate with a mechanical floor at level k = 3 in a multi-story building model.
Single-drawing arraysExternal references (XREFs) as array sources: advanced workflows use externally referenced blocks as the source object, enabling firm-wide updates to array items via the XREF mechanism, with per-project overrides managed through item replacement.

Looking forward, the trajectory of array technology in CAD points toward deeper integration with Building Information Modeling (BIM) and generative design. In Revit—Autodesk's BIM platform—array-like functionality is inherent in the family/type system, where overriding individual instances is standard practice. As AutoCAD increasingly targets interoperability with BIM workflows (through the AEC toolsets and IFC export), the ability to manage arrays with per-item overrides becomes a critical bridge skill. For CS students, this evolution mirrors the broader software engineering trend from monolithic, copy-paste architectures toward component-based, parametric systems—a principle that applies equally to CAD models and software codebases.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain, in your own words, why the REPlace sub-option of ARRAYEDIT is unavailable when working with a non-associative array. What specific architectural feature of an associative array makes item replacement possible?
PROBLEM 2BASIC CALCULATION
A rectangular associative array has 5 rows, 10 columns, and 3 levels (Z-axis repetitions). The designer replaces 4 items in the array with an alternate block. How many items still display the original source geometry? What is the total number of unique index tuples in the override table?
PROBLEM 3INTERMEDIATE
You have a polar associative array of 12 bollard blocks distributed evenly around a center point with a fill angle of 360°. The client requests that every third bollard (positions 0, 3, 6, 9 in 0-indexed terms) be replaced with a planter block. Describe the ARRAYEDIT workflow you would use, including how many times you would invoke the REPlace sub-option and what the resulting override table would contain.
PROBLEM 4APPLIED
An MEP engineer uses a path array along a duct run to place 20 diffuser blocks at equal intervals. After completing the array, the engineer discovers that diffusers at positions 5 and 12 must be a larger size to meet airflow requirements, and the diffuser at position 18 must be deleted entirely because it conflicts with a structural member. Describe the complete editing workflow, identifying which ARRAYEDIT sub-options are used at each stage and what the final override table looks like.
PROBLEM 5CRITICAL THINKING
A colleague argues that non-associative arrays are always inferior and should never be used because they lack item replacement and parametric editing. Construct a well-reasoned counter-argument identifying at least three scenarios where a non-associative (exploded) array is preferable, and explain the trade-offs involved in each scenario.

Lesson Summary

AutoCAD's associative arrays introduced in 2012 transformed array handling from a simple copy operation into a parametric, single-entity architecture that stores a source object, pattern parameters, and an override table of per-item modifications. The ARRAYEDIT → REPlace workflow enables designers to substitute specific items at any index tuple (row, column, level) with alternate geometry while preserving the pattern's parametric backbone. Non-associative (exploded) arrays, by contrast, consist of independent copies with no centralized data structure, making item replacement impossible but offering universal compatibility and full per-element editing freedom.

The key design principle underlying this feature is the separation of pattern definition from per-item customization—a concept that mirrors inheritance and method overriding in object-oriented programming. Replacements are non-destructive and reversible via the RESet option, but permanently lost if the array is exploded. Mastering when to maintain associativity and when to explode is a critical judgment call that affects downstream editing, file size, interoperability, and automation capabilities. For advanced workflows, the AutoLISP and .NET APIs provide programmatic access to the override table, enabling batch replacement operations across entire drawing sets.

Varsity Tutors • AutoCAD • Array Item Replacement — Replace items in an array; understand associative vs non-associative arrays (conceptual)