2.2 Layer Filters & Viewport Overrides

Key Takeaways

  • Layer Property Filters dynamically evaluate wildcards (*, ?, ~, #, @) and property criteria across drawing layers, while Group Filters are static manual layer groupings.

  • External reference layers follow the syntax XrefName|LayerName using the reserved vertical pipe (|) character, preventing in-host renaming while maintaining clear drawing provenance.

  • System variable VISRETAIN = 1 retains host drawing modifications to xref layer properties across sessions, while modern VISRETAINMODE provides granular bitcode control over which specific properties sync.

  • Viewport layer overrides (VP Freeze, VP Color, VP Linetype, VP Lineweight, VP Transparency) modify layer display locally in active layout viewports without altering Model space or other viewports.

  • In the Layer Properties Manager, cells with active viewport overrides display a highlighted background, and overrides can be cleared per layer, per property, or globally via context menus.

Last updated: October 2026

2.2 Layer Filters & Viewport Overrides

As AutoCAD project models expand to encompass architectural, structural, civil, and MEP disciplines, drawing databases frequently accumulate hundreds or thousands of distinct layers. Navigating and managing this volume requires advanced organizational tools. This section explores dynamic Property Filters, manual Group Filters, external reference layer architecture governed by VISRETAIN and VISRETAINMODE, and paper space viewport layer overrides.


1. Layer Filtering Architecture: Property Filters vs. Group Filters

The tree pane on the left side of the Layer Properties Manager provides two powerful mechanisms to organize layers into logical subsets: Property Filters and Group Filters.

+-------------------------------------------------------------------------+
| Filter Tree                | Layer List (Filtered)                      |
+-------------------------------------------------------------------------+
| [-] All (184 Layers)       | Status | Name             | On | Freeze... |
|   [+] All Non-Xref Layers  | ( )    | A-WALL-FULL      | ON | Thaw      |
|   [-] Property Filters     | ( )    | A-WALL-PART      | ON | Thaw      |
|       |-- Wall Layers      | ( )    | A-DOOR-IDEN      | ON | Thaw      |
|       |-- Frozen Layers    |                                            |
|   [-] Group Filters        |                                            |
|       |-- Electrical Sub   |                                            |
|       |-- Permit Set       |                                            |
+-------------------------------------------------------------------------+
| [X] Invert filter          | Total: 184 layers | Displayed: 12 layers   |
+-------------------------------------------------------------------------+

Property Filters (Dynamic Rule-Based Sets)

A Property Filter (New Property Filter icon or Alt+P) dynamically populates its layer list by evaluating logical expressions against layer attributes (name patterns, color, linetype, lineweight, plot state, freeze status, or xref membership).

  • Dynamic Updating: If an engineer creates a new layer tomorrow named A-WALL-EXTR, any Property Filter configured with the pattern *WALL* automatically captures and displays that new layer immediately without manual intervention.
  • Wildcard Syntax: AutoCAD utilizes standard DOS/Unix-style wildcard characters within Property Filter definition fields.
Wildcard CharacterFunctionExample PatternMatches
* (Asterisk)Matches any string of characters (including zero characters).A-*Any layer starting with A- (A-WALL, A-DOOR-IDEN, A-).
? (Question Mark)Matches any single character.E-LGT-??E-LGT-01, E-LGT-AB; does not match E-LGT-1 or E-LGT-100.
~ (Tilde)Negates the pattern (NOT operator); excludes matching layers.~*XREF*All layers whose names do NOT contain the string XREF.
# (Hash / Pound)Matches any single numeric digit (0 through 9).S-GRID-##S-GRID-01, S-GRID-99; does not match S-GRID-1A.
@ (At Sign)Matches any single alphabetical character (A through Z).M-HVAC-@M-HVAC-A, M-HVAC-Z; does not match M-HVAC-1.
, (Comma)Acts as a logical OR separator within a single expression.A-WALL*,S-WALL*Matches layers starting with either A-WALL OR S-WALL.

Group Filters (Static Manual Sets)

A Group Filter (New Group Filter icon or Alt+G) is a static collection of layers created by manually dragging and dropping layers from the main layer list into the group folder.

  • Static Behavior: Layers remain in the group until manually removed. Creating new layers will never automatically populate a Group Filter, regardless of layer name or properties.
  • Use Case: Group filters are ideal for bundling unrelated layers needed for specific drafting milestones, such as a specialized "Permit Submittal" check set combining architectural dimensions, structural footings, and zoning boundaries.

Invert Filter Checkbox

Located at the bottom of the Layer Properties Manager tree pane, checking Invert filter instantly reverses the active filter display, showing all layers that do not meet the criteria of the selected filter.


2. External Reference Layer Syntax and Management

When a drawing is attached as an External Reference (XREF), AutoCAD incorporates all layers from the external file into the host drawing's database while maintaining drawing boundary isolation.

Syntax Convention: XrefName|LayerName

AutoCAD combines the reference file name and the source layer name, separated by a vertical bar or pipe character (|): Host Display Name=XrefName∣LayerName\text{Host Display Name} = \text{XrefName} \mid \text{LayerName} For example, if a base architectural drawing named ARCH-BLDG.dwg containing layer A-WALL-FULL is attached to an electrical host drawing, the layer appears in the host as: ARCH-BLDG|A-WALL-FULL

Layers that arrive through a nested reference are xref-dependent too, so they also carry a pipe-delimited xref-name prefix. Use the tree view of the External References palette to see which parent drawing brings each nested reference in.

Note

The pipe character (|) is illegal and reserved in AutoCAD. Users cannot enter a pipe when creating or renaming layers within a standard drawing. Because of this restriction, xref layers cannot be renamed in the host drawing. To change an xref layer name, the source drawing itself must be opened and modified.

Reading a Layer's Origin from Its Prefix (Bound vs. Non-Bound)

Objective 1.1.d asks you to identify where a layer came from by its name:

  • ARCH-BLDG|A-WALL-FULL — a non-bound xref that is still attached; the pipe separates the xref name from the source layer name.
  • ARCH-BLDG$0$A-WALL-FULL — an xref that was bound with the Bind option; the pipe became $0$ (the number increases to $1$, $2$ if that name already exists).
  • A-WALL-FULL (no prefix) — a native host layer, or a layer merged in when an xref was bound with the Insert option.

Binding methods are covered in detail in 10.1.


3. Controlling Xref Layer Behavior: VISRETAIN & VISRETAINMODE

When collaborating across multidisciplinary teams, host drawings frequently require custom modifications to xref layers—such as muting consultant background colors or freezing unnecessary ceiling grids.

                          ┌─────────────────────────────────────┐
                          │     Xref Reload / File Re-open      │
                          └──────────────────┬──────────────────┘
                                             │
                   ┌─────────────────────────┴─────────────────────────┐
                   ▼                                                   ▼
         ┌────────────────────┐                             ┌────────────────────┐
         │   VISRETAIN = 0    │                             │   VISRETAIN = 1    │
         └─────────┬──────────┘                             └─────────┬──────────┘
                   │                                                   │
                   ▼                                                   ▼
         Local overrides discarded.                         Local host overrides retained.
         Host layers reset to match                         Governed by VISRETAINMODE
         external source DWG properties.                    bitcode synchronization.

The VISRETAIN System Variable

  • VISRETAIN = 0: Layer properties in the host drawing reset to match the external source drawing every time the host drawing is opened or the xref is reloaded. Any layer color, linetype, lineweight, or visibility modifications made in the host drawing are discarded.
  • VISRETAIN = 1 (Standard Default): Layer property modifications made to xref layers within the host drawing are saved and retained in the host drawing database across drawing sessions and reloads.

Granular Control via VISRETAINMODE

With VISRETAIN = 1, host overrides persist, but in AutoCAD 2017 and earlier that also meant the host never picked up legitimate consultant changes (such as a revised linetype). The VISRETAINMODE system variable (used when VISRETAIN = 1) fixes this with a bitcode: each bit you include names a layer property that synchronizes from the source xref when it is reloaded; properties whose bits are left out keep the host drawing's overrides.

Bitcode ValueControlled Layer PropertyEffect When the Bit Is Included
0None (initial value)Nothing synchronizes; host overrides are kept, as with VISRETAIN = 1 in AutoCAD 2017 and earlier.
1On / OffOn/Off states synchronize from xref upon reload.
2Freeze / ThawFreeze/Thaw states synchronize from xref upon reload.
4Lock / UnlockLock states synchronize from xref upon reload.
8Plot / No-PlotPlot states synchronize from xref upon reload.
16ColorColor assignments synchronize from xref upon reload.
32LinetypeLinetype assignments synchronize from xref upon reload.
64LineweightLineweight assignments synchronize from xref upon reload.
128TransparencyTransparency percentages synchronize from xref upon reload.
256Plot StylePlot styles synchronize from xref upon reload.
512New VP FreezeNew VP Freeze settings synchronize from xref upon reload.
1024DescriptionLayer descriptions synchronize from xref upon reload.

Tip

To keep your own On/Off and Freeze/Thaw settings while letting the consultant's color and linetype changes come through, include only the Color (16) and Linetype (32) bits: set VISRETAINMODE = 48 with VISRETAIN = 1. To synchronize several properties, add their bit values (for example, 3 = On/Off plus Freeze/Thaw).


4. Viewport Layer Overrides in Paper Space

Viewport layer overrides allow drafters to display the exact same model space geometry differently across multiple layout sheets without duplicating geometry or creating separate drawings.

Global Freeze vs. Viewport Freeze (VP Freeze)

  • Global Freeze (Freeze column): Freezes the layer across Model space and all paper space viewports simultaneously. Suppresses objects from graphics pipeline regeneration.
  • Viewport Freeze (VP Freeze column): Freezes the layer only within the currently active layout viewport. The layer remains fully visible in Model space and in all other viewports. For instance, furniture layers can be frozen in an electrical layout viewport while remaining visible in an architectural layout viewport.
  • Global Off vs. VP Freeze: Turning a layer Off globally affects all views and still processes geometry during REGEN. VP Freeze is localized and optimizes viewport performance.

Viewport Property Override Columns

When a paper space layout tab is active and the cursor is double-clicked inside a viewport (floating Model space), the Layer Properties Manager reveals five dedicated viewport override columns:

  1. VP Color: Assigns an independent color in the active viewport (e.g., overriding walls to light grey ACI 8 or 253 for background screening).
  2. VP Linetype: Overrides the linetype in the active viewport (e.g., displaying piping as dashed in a coordination view).
  3. VP Lineweight: Overrides line thickness locally (e.g., thinning background architectural walls to 0.13 mm).
  4. VP Transparency: Adjusts opacity specifically within that viewport.
  5. VP Plot Style: Changes pen assignments for named plot style drawings (.stb).
+-----------------------------------------------------------------------------------------+
| Layer Properties Manager (Inside Active Layout Viewport)                                |
+-----------------------------------------------------------------------------------------+
| Status | Name         | Color   | Linetype   | VP Freeze | VP Color*  | VP Lineweight*      |
+--------+--------------+---------+------------+-----------+------------+---------------------+
| ( )    | A-WALL-FULL  | White   | Continuous | Thawed    | [ Cyan ]   | [ 0.50 mm ]         |
| ( )    | E-POWR-CIRC  | Green   | Continuous | Thawed    | [ Green ]  | [ Default ]         |
| ( )    | M-HVAC-DUCT  | Magenta | Continuous | Frozen    | [ Magenta] | [ Default ]         |
+-----------------------------------------------------------------------------------------+
* Note: Brackets indicate the highlighted background that marks an active viewport override.

5. Identifying & Removing Viewport Overrides

Tracking and clearing viewport overrides is crucial when preparing drawings for publication or resetting standards.

Visual Identification

  • Highlighted Background: In the Layer Properties Manager, any property cell containing an active viewport override is shown with a highlighted background so it stands out from global settings.
  • System Property Filter: Whenever at least one layer in the current viewport contains a viewport override, AutoCAD automatically generates a system filter folder named Viewport Overrides in the filter tree pane.
  • System Variable VPLAYEROVERRIDES: A read-only system variable. Returns 1 if the current layout viewport has any layer property overrides; returns 0 if it has none.

Removing Viewport Overrides

To strip viewport overrides and restore global model properties:

  1. Double-click inside the target viewport to activate it.
  2. Open the Layer Properties Manager (LA).
  3. Select one or more layers containing overrides (or select all layers with Ctrl+A).
  4. Right-click on any highlighted property column header or cell.
  5. Navigate to Remove Viewport Overrides for:
    • Selected Layers or All Layers
    • In Current Viewport Only or In All Viewports
    • Choose specific properties (e.g., Color, Linetype, Lineweight, or All Properties).

Viewport Control via Command Line (VPLAYER)

The VPLAYER (Viewport Layer) command provides scriptable, command-line control over viewport freeze, thaw, and property overrides without opening the graphical palette. It is the primary tool used in custom AutoLISP routines and batch publishing scripts to automate viewport layer standardization across enterprise sheet sets.

Test Your Knowledge

A project CAD manager needs to create a Layer Property Filter that matches all architectural and structural wall layers whose names begin with either 'A' or 'S', followed by a hyphen, then 'WALL', followed by a hyphen and exactly two numeric digits indicating floor levels (e.g., A-WALL-01, S-WALL-02). Which filter expression satisfies this requirement?

A

[A,S]-WALL-??

B

A-WALL-##,S-WALL-##

C

~A,S-WALL-*

D

@WALL##

Test Your Knowledge

While working inside an active layout viewport, a drafter observes that several architectural layers display a highlighted background in their VP Lineweight and VP Color columns. What command or interface action restores these layer properties to match their global Model Space settings for that specific viewport without affecting other viewports?

A

Change the system variable VISRETAIN from 1 to 0, then execute REGENALL to reload the global layer values.

B

Execute the PURGE command and purge the unreferenced viewport layer state overrides from the drawing.

C

Run LAYUNISO in paper space, then set VPLAYEROVERRIDES to 0 at the command prompt to clear the flags.

D

In the Layer Properties Manager, use Remove Viewport Overrides for Selected Layers > In Current Viewport Only.

Test Your Knowledge

An engineering team attaches a structural background drawing as an external reference (STRUCT-BASE.dwg). The drafter modifies several layer colors of STRUCT-BASE within the host drawing. Later, the structural consultant updates STRUCT-BASE.dwg with new layer colors and lineweights. When the host drawing is reopened, all the consultant's original layer colors overwrite the drafter's local modifications. What caused the local overrides to be lost?

A

The host drawing has the system variable VISRETAIN set to 0.

B

The external reference was attached as an Overlay rather than an Attachment.

C

The XREF layer names contained invalid pipe (|) characters in the host drawing.

D

The system variable XREFOVERRIDE was set to 1 in the host drawing.

Sections you finish are checked off in the contents.