Atomic Knowledge · AutoCAD

Purge, Audit & Recover

AutoCAD file maintenance commands that remove unused objects, fix database errors, and recover corrupted drawings.

Definition & Context

Three commands form AutoCAD's file-health toolkit: PURGE removes unused named objects (layers, blocks, linetypes, dimension styles, materials) that bloat file size; AUDIT scans the drawing database for internal inconsistencies and optionally fixes them; RECOVER opens a damaged .dwg and repairs structural corruption that prevents normal opening.

PURGE should be run periodically (especially before transmitting drawings) — a file that accumulates 500 unused block definitions from copy-paste operations can be 10x larger than necessary. Use -PURGE with the All option in scripts for batch cleanup. PURGE does not delete in-use objects, so it's always safe.

AUDIT checks the object hierarchy, entity ownership chains, and dictionary references. Run it when you encounter unexplained crashes, phantom objects, or selection-set anomalies. RECOVER is the last resort — it bypasses the normal file-open code path and rebuilds the database from raw binary. RECOVERALL extends this to all xrefs. After recovery, always AUDIT + PURGE the result and verify critical geometry wasn't lost.

Why It Matters

PURGE, AUDIT, and RECOVER are AutoCAD's file-hygiene commands: PURGE removes unused named objects to shrink files, AUDIT fixes internal errors in an open drawing, and RECOVER opens and repairs corrupt DWGs — essential first aid for bloated or damaged files.

Best Practices

  • Run PURGE (including zero-length geometry and empty regapps) to cut file size.
  • AUDIT and fix errors periodically on working drawings.
  • Use RECOVER on files that won't open normally.
  • Keep backups before aggressive purging of a shared file.

Common Pitfalls

  • Assuming a single PURGE pass removes everything (run it repeatedly).
  • Ignoring persistent AUDIT errors that signal deeper corruption.
  • Editing a corrupt file instead of RECOVERing it first.
  • Purging shared drawings without a backup.

Core Commands & Practical System Operations

Executing Purge, Audit & Recover effectively relies on specialized CAD/BIM command workflows and system variable configurations: Core CAD commands: LINE, PLINE, BLOCK, DIMSTYLE, PURGE, AUDIT. Settings: DYNAMICINPUT=1, SAVETIME=10, VISRETAIN=1.

Standard Engineering Workflow for Purge, Audit & Recover

1. Design Intent & Standards Definition

Establish drawing limits, layer hierarchies, lineweights, color palettes, and text styles in accordance with company CAD standards and project specifications.

2. Precision 2D/3D Geometry Construction

Construct primary shapes using absolute/relative polar coordinates, object snaps (OSNAP), and parametric constraints to guarantee mathematical accuracy.

3. Modular Structuring & Reference Linking

Group reusable sub-elements into standardized Blocks and link background consultant data as External References (Xrefs) using relative file paths.

4. Quality Assurance, Annotation & Output

Apply annotative dimensions, run automated standard audits (DWS), clean database with PURGE/AUDIT, and publish vector PDF packages.

Common Failure Scenarios & Troubleshooting

Failure / Geometric IssueRoot Cause & Mitigation Strategy
Drawing file size balloons and displays noticeable viewport lagUnused blocks, registered applications (RegApps), and DGN linetypes bloating file. Run <code>-PURGE > R > * > N</code> and <code>AUDIT</code> to scrub internal database.
Text and dimensions scale disproportionately across paper space viewportsObjects were not assigned Annotative properties. Enable Annotative scaling in Style managers and assign active viewport scales.
Line styles print as solid lines rather than dashed/hiddenLinetype scale mismatch. Adjust <code>LTSCALE</code>, <code>PSLTSCALE=1</code>, and <code>MSLTSCALE=1</code> to ensure uniform dashed appearance across all viewports.

Industry Standards & Compliance Codes

  • ISO 128 (Technical Product Documentation - General Principles of Presentation)
  • ASME Y14.100 (Engineering Drawing Practices)
  • ISO 9001 CAD Quality Assurance Guidelines

Sources & Further Reading