1.1 Drawing Maintenance & Health

Key Takeaways

  • AUDIT evaluates the active drawing database and repairs table errors when the Fix option is set to Yes, while RECOVER and RECOVERALL open and repair damaged files directly from disk.

  • RECOVERALL is essential for external reference management because it recursively audits and repairs the host drawing and every attached or nested xref in a single automated pass.

  • Unreferenced Registered Applications (RegApps) cause severe file bloat and performance lag and must be purged using the command-line -PURGE command, as the standard PURGE dialog cannot remove them.

  • Autosave files (.sv$) are generated at intervals defined by SAVETIME in the directory specified under Options > Files, whereas backup files (.bak) preserve the drawing state prior to the most recent manual save.

  • OVERKILL optimizes drawing geometry by deleting duplicate coincident objects, removing redundant polyline vertices, and merging collinear lines and arcs based on precision tolerances and property filters.

Last updated: October 2026

1.1 Drawing Maintenance & Health

Note

A corrupted or unoptimized drawing database causes sluggish performance, ballooning file sizes, unexplained crashes, and fatal errors during publish operations. Professional AutoCAD drafting requires proactive database maintenance using built-in diagnostic and cleanup utilities.

Every AutoCAD drawing (.dwg) is an indexed object database containing geometric entities, symbol tables (Layers, Linetypes, Text Styles, Dimension Styles, Block Definitions), dictionaries, and extended entity data (XData). When drawings are repeatedly edited across networks, translated from third-party CAD applications, or nested as external references, internal pointers can break or become orphaned. Maintaining drawing health ensures reliable plotting, fast save times, and seamless team collaboration.


AutoCAD Database Architecture and Corruption Vectors

Drawing corruption rarely stems from visible vector geometry. Instead, it typically develops within non-graphical database tables and memory structures:

  • Orphaned Pointers: Pointers that reference non-existent blocks, layers, or text styles.
  • Symbol Table Discrepancies: Duplicate or malformed records in the layer or linetype tables.
  • Registered Applications (RegApps): Third-party or vertical application metadata attached to entities that persists long after the original software is gone.
  • Network Interruption: Power failures or dropped server connections during a QSAVE or SAVEAS operation, leaving incomplete database headers.
  • Proxy Objects: Missing Object Enablers from AutoCAD Architecture, Civil 3D, or third-party add-ins leaving unreadable custom objects.

Recognizing the symptoms of corruption—such as unexplainable crashes upon opening, missing xref layers, or extreme latency when selecting objects—is the first step toward recovery.


Diagnosing and Repairing Active Drawings: The AUDIT Command

The AUDIT command evaluates the integrity of the currently open drawing database and corrects internal table errors.

Command Syntax and Workflow

  1. Type AUDIT at the command line and press Enter.
  2. AutoCAD displays the prompt: Fix any errors detected? [Yes/No] <N>:
  3. Entering N (No) performs a diagnostic scan only. AutoCAD lists any invalid pointers, missing records, or damaged entities in the Command Line / Text Window (F2), reporting total errors found and total errors fixed (0).
  4. Entering Y (Yes) instructs AutoCAD to evaluate the database and automatically repair every detected error, writing the corrections directly to the active drawing session.

Tip

Set the system variable AUDITCTL = 1 before running AUDIT. This instructs AutoCAD to generate an audit report text file (.adt) in the same directory as the drawing, documenting every repaired database record for your project maintenance logs.


Opening Damaged Drawings: RECOVER vs. RECOVERALL

When a drawing file is damaged to the point where the standard OPEN command triggers a fatal crash or displays the error message "Drawing file is invalid", the file must be opened using recovery commands.

                                  ┌─► RECOVER ──► Opens & repairs ONLY the host drawing
Damaged Drawing Diagnostic Path ──┤
                                  └─► RECOVERALL ──► Opens & repairs host DWG + ALL attached/nested Xrefs

The RECOVER Command

RECOVER bypasses the standard open sequence. It reads the raw database directly from disk, rebuilds corrupted block headers, validates entity handles, repairs damaged symbol tables, and then opens the drawing in the editor. Upon completion, a Drawing Recovery summary dialog displays the number of errors found and fixed.

The RECOVERALL Command

Most modern commercial drawings rely heavily on external references (xrefs). If a host drawing references five external drawings and one of those xrefs has a corrupted block table, running RECOVER on the host drawing alone will not fix the problem—the drawing will crash again as soon as the damaged xref is resolved.

RECOVERALL resolves this challenge completely:

  1. It opens the designated host drawing.
  2. It traverses the entire reference tree, recursively opening, auditing, and repairing every attached and nested external reference.
  3. It displays an integrated summary window detailing errors found and repaired in each individual file across the entire xref hierarchy.
CommandWhen to UseHost DWG Fixed?Attached Xrefs Fixed?Nested Xrefs Fixed?
AUDITDrawing is already open in AutoCADYes (if Fix = Yes)NoNo
RECOVERFile fails to open normallyYesNoNo
RECOVERALLComplex assembly or sheet fails to openYesYesYes

Disaster Recovery: Drawing Recovery Manager and Backup Files

AutoCAD provides a multi-tiered file safety architecture to protect work against power loss, operating system crashes, or hardware failures.

Drawing Recovery Manager (DRAWINGRECOVERY)

Following an abnormal program termination, launching AutoCAD automatically displays the Drawing Recovery Manager palette. You can also open it manually at any time with the DRAWINGRECOVERY command; DRAWINGRECOVERYHIDE closes it.

The palette organizes files in a hierarchical tree:

  • Drawing Nodes: Lists each drawing file that was active during the crash.
  • File Variants: Under each drawing node, AutoCAD displays all available versions:
    • The original drawing file (.dwg).
    • The standard backup file (.bak).
    • Any automatic save files (.sv$).

Selecting any file in the tree displays a preview along with its file size, last modified timestamp, and storage directory. Right-clicking a version allows you to Open it immediately, inspect its content, and save it under the primary project name.

Understanding AutoCAD Safety File Extensions

.dwg (Live Working File) ──[Manual QSAVE]──► Renames previous state to .bak
                         ──[Timer: SAVETIME]──► Writes snapshot to .sv$
                         ──[Active Session]──► Scratch/Undo cache in .ac$
  • .bak (Backup File): Created automatically in the exact same directory as the drawing every time you manually save (QSAVE or SAVEAS). It preserves the state of the drawing immediately prior to the current save. Governed by the system variable ISAVEBAK (1 = enabled, 0 = disabled).
  • .sv$ (Automatic Save File): Created at recurring intervals determined by the SAVETIME system variable (default is 10 minutes). It is written to the directory specified under Options > Files > Automatic Save File Location (typically %TEMP%). If AutoCAD closes normally, .sv$ files are automatically deleted. After a crash, locate the .sv$ file, rename its extension to .dwg, and open it.
  • .ac$ (Temporary File): Used internally to hold undo/redo history and memory swap data. These files are deleted upon normal exit and cannot be used to recover drawing geometry.

Database Streamlining: PURGE vs. -PURGE and RegApps

Over the course of a project, drawings accumulate unused block definitions, empty layers, obsolete text and dimension styles, and unreferenced linetypes. These dormant items inflate file size and degrade performance.

The Graphical PURGE Dialog (PURGE)

Typing PURGE opens the interactive Purge dialog box, which presents two primary categories:

  1. Purgeable Items: Named objects that have zero instances in the drawing and are not referenced by other definitions.
  2. Find Non-Purgeable Items: Named objects that cannot be deleted. Selecting an item in this tree displays a detailed breakdown explaining why it cannot be purged (e.g., the layer contains 14 entities, or the text style is assigned to an active dimension style) and provides a direct link to select those objects in the drawing.

Critical options in the Purge dialog include:

  • Purge nested items: Recursively purges unused sub-definitions (such as blocks defined inside other unused blocks) in a single operation.
  • Purge zero-length geometry and empty text objects: Cleans up degenerate line segments (lines where start and end points are identical) and blank MText/DText containers.
  • Purge orphaned data: Removes obsolete DGN linestyle data left over from MicroStation translations.

Warning

The standard graphical PURGE dialog cannot purge unreferenced Registered Applications (RegApps). Relying solely on the dialog leaves one of the largest sources of file bloat completely untouched.

Command-Line Purging and RegApps (-PURGE)

Registered Applications (RegApps) are application IDs stored in the APPID symbol table. Third-party software and vertical AutoCAD applications attach extended entity data (XData) stamped with these IDs. When drawing entities are copied and pasted between files, the associated RegApps travel with them. Over time, a drawing can accumulate tens of thousands of unreferenced RegApps, bloating a 2 MB drawing into a 60 MB file that freezes viewports and takes minutes to save.

To eradicate RegApps, use the command-line version of purge:

  1. Type -PURGE (with the leading hyphen) and press Enter.
  2. Enter R for Regapp: Enter name(s) to purge <*>:
  3. Press Enter to accept the asterisk wildcard (*) to target all registered applications.
  4. AutoCAD prompts: Verify each name to be purged? [Yes/No]:
  5. Enter N (No) and press Enter.

AutoCAD immediately deletes all unreferenced RegApps and reports the total count (frequently thousands of records) in the Command Line, instantly restoring file responsiveness.


Geometric Optimization: The OVERKILL Command

The OVERKILL command cleans and standardizes geometry by removing duplicate or overlapping vector entities. It eliminates redundant lines, arcs, and polylines that cause plotting artifacts, double laser-cutting passes, and inaccurate bill-of-materials inquiries.

Key Settings in the Delete Duplicate Objects Dialog

  • Object Comparison Tolerance: Sets the precision limit (e.g., 0.000001) within which coordinate endpoints are considered identical.
  • Ignore Object Properties: Checkboxes for Color, Layer, Linetype, Lineweight, Plot Style, and Transparency.
    • Checked: AutoCAD ignores property differences and merges overlapping entities regardless of differences.
    • Unchecked: AutoCAD treats objects with differing properties as unique, preserving them independently.
  • Polyline Options (Optimize segments within polylines): Removes unnecessary intermediate vertices along straight polyline segments.
  • Combine Collinear Objects:
    • Combine collinear objects that partially overlap: Merges two overlapping line segments into one continuous line.
    • Combine collinear objects when aligned end to end: Merges two abutting collinear segments into a single entity.

Professional Maintenance Sequence

When standardizing or repairing suspect drawings, execute maintenance tasks in this strict diagnostic sequence:

Step 1: AUDIT (Fix = Yes) ──► Repairs broken database pointers
Step 2: -PURGE (Regapp)   ──► Eliminates external application ID bloat
Step 3: PURGE (Nested)    ──► Removes unused layers, blocks, and orphaned DGN data
Step 4: OVERKILL          ──► Merges overlapping and duplicate vectors
Step 5: QSAVE             ──► Writes clean, compact database to disk
Test Your Knowledge

A project drawing containing multiple nested external references (xrefs) fails to open smoothly and triggers repeated internal database error messages. Which command is designed to open the host drawing, audit and repair its database, and recursively audit and fix all attached and nested xrefs in a single automated process?

A

RECOVERALL

B

AUDIT

C

RECOVER

D

PURGE

Test Your Knowledge

A drafter inherits a civil engineering drawing from an external consultant that has become sluggish, takes minutes to save, and has ballooned to 45 MB despite containing minimal vector geometry. An audit reveals thousands of unreferenced application IDs. How should the drafter permanently eliminate these unreferenced Registered Applications (RegApps)?

A

Open the standard PURGE dialog, select the All Items option, and click Purge All

B

Run the OVERKILL command and check the box to optimize polyline segments

C

Run -PURGE at the command line, choose Regapps, accept the * wildcard, and answer No to verifying each name

D

Open the Drawing Recovery Manager, revert the drawing to its previous .bak backup file, and save it under a new name

Test Your Knowledge

When preparing a floor plan for architectural presentation, a technician runs the OVERKILL command to clean overlapping line work. The technician needs to combine overlapping collinear line segments while strictly preserving entities that have different layer and color assignments. How should the Delete Duplicate Objects dialog be configured?

A

Check Layer and Color under 'Ignore object properties', and clear 'Combine collinear objects that partially overlap' before running

B

Leave Layer and Color unchecked under 'Ignore Object Properties', and check 'Combine collinear objects that partially overlap'

C

Enable 'Optimize segments within polylines' and set the tolerance value to 1.0 units

D

Check 'Combine collinear objects when aligned end to end' and check the Color box under 'Ignore Object Properties'

Sections you finish are checked off in the contents.