This guide explains AutoCAD auditing in clear, beginner-friendly steps: what it is, why and when to use it, how to run it, alternatives, common errors and fixes, and practical tips to keep your drawings healthy.
What is auditing?
Auditing in AutoCAD is the process of detecting and repairing errors or corruption inside a drawing file. The built-in AUDIT command scans drawing database structures and attempts to fix inconsistencies such as invalid objects, corrupt records, and reference problems. Its goal is to restore file integrity so the drawing opens, saves, and behaves predictably.
Key related concepts:
- Corrupted drawing: A DWG that has internal database errors causing crashes, missing entities, display problems, or failed saves.
- Recovery: Using
RECOVERto open and repair a file that won’t open normally. - Purge: Using
PURGEto remove unused named objects (layers, styles, blocks) that can bloat or complicate drawings. - Overkill: The
OVERKILLcommand to remove duplicate or overlapping geometry.
Why use auditing? (Purpose and benefits)
- Restore file integrity: Fixes database-level errors that cause unstable behavior.
- Prevent data loss: Repairs can recover objects that would otherwise be lost.
- Improve performance: Removing corrupted or unnecessary records speeds up open/save and redraw.
- Stabilize collaboration: Clean drawings reduce issues when using Xrefs or when sharing files with colleagues.
- Avoid cascading problems: Corruption in Xrefs can spread; auditing helps stop propagation.
When to use auditing
Use auditing when you encounter any of the following:
- AutoCAD reports errors on open (e.g., “drawing file contains errors”).
- Frequent crashes or freezes when opening or editing a file.
- Objects fail to display, snap, or behave correctly.
- Save operations fail or produce unusually large files.
- Problems appear only when attaching Xrefs or plotting.
As a best practice, run AUDIT when you receive drawings from external sources or if a drawing hasn’t been cleaned for a long time.
How to run AutoCAD auditing — Step-by-step
Save a backup copy first
- Always create a copy of the DWG before repairing. AutoCAD creates
.bakand.sv$files but keep your own backup.
- Always create a copy of the DWG before repairing. AutoCAD creates
Open the file in AutoCAD
- If the file won’t open normally, use
RECOVER(see below).
- If the file won’t open normally, use
Run the AUDIT command
- Type
AUDITon the command line and press Enter. - AutoCAD asks: “Fix any errors detected?” — type
Yfor Yes to allow automatic fixes. - Wait for the command to finish. A summary will appear listing fixes made.
- Type
Save the repaired drawing
- Use
SAVEASand save to a new filename (e.g., append_repaired) to preserve the original copy for reference.
- Use
Check and clean up
- Run
PURGEto remove unused named objects (PURGE→ enter →ALL→Yes). - Run
OVERKILLon 2D geometry to remove duplicates (select objects → typeOVERKILL→ accept defaults or adjust). - Inspect layers, blocks, and Xrefs visually.
- Run
Test normal workflows
- Open, draw, save, attach Xrefs, and plot to ensure the issue is resolved.
Recovering a drawing that won’t open
Use
RECOVER:- From AutoCAD, type
RECOVER, select the DWG. The command attempts to repair and opens the file. - If the drawing has Xrefs, use
RECOVERALLto attempt recovery on referenced drawings as well.
- From AutoCAD, type
If
RECOVERfails:- Try opening and saving as DXF:
SAVEAS→ choose DXF format, then open the DXF and save back as DWG. - Use a backup copy: rename
.bakto.dwgand open. - Use Autodesk’s drawing recovery Manager (AutoCAD displays it on unexpected shutdowns) to recover autosave
.sv$files (rename to.dwgfirst).
- Try opening and saving as DXF:
Editing results after an audit (how to fix problematic objects)
Identify problematic objects:
- Use
QSELECTor Properties palette to find unusual entities or layers. - Turn off suspicious layers and isolate objects to test.
- Use
Remove or replace problematic blocks:
- Explode corrupted blocks (
EXPLODE) and recreate as needed. - Redefine blocks by inserting a fresh copy or using
BLOCK/WBLOCKto rewrite them.
- Explode corrupted blocks (
Purge and clean styles:
- Use
PURGEfor layers, linetypes, text styles, and dimension styles. - If styles are corrupt, recreate them in a clean template and transfer with
INSERTorCOPYBASE/PASTECLIP.
- Use
Recreate problematic elements:
- If a specific object type causes issues (e.g., a heavy Raster image or OLE object), remove and reinsert it.
Save to a new file:
- Use
WBLOCK(Write Block) to write the entire drawing to a new DWG file to eliminate hidden corruption.
- Use
Alternative methods and related commands
-AUDIT(command-line version):- Runs
AUDITwithout dialog boxes. Use scriptable for batch processing.
- Runs
RECOVERandRECOVERALL:- For drawings that won’t open or have corrupt Xrefs.
PURGE:- Remove unused named objects and reduce drawing size.
OVERKILL:- Remove duplicate or overlapping geometry that can cause errors or slow performance.
save as DXF:
- Exports the drawing to DXF and re-imports, which often eliminates obscure DWG corruption.
Use a clean template:
- Create a New drawing from a trusted template and import entities using
INSERTorCopy/Pasteto transfer content to a clean database.
- Create a New drawing from a trusted template and import entities using
Batch processing:
- Use scripts or LISP to run
-AUDIT,PURGE, and save for many files automatically.
- Use scripts or LISP to run
Common errors and fixes
Error: “Drawing file contains errors” or “File is not a drawing file”
- Fix: Run
AUDITorRECOVER. If that fails, try.bakor.sv$recovery, or DXF export/import.
- Fix: Run
Error: Objects invisible or not selectable
- Fix: Check layer visibility, freeze/thaw, and use
AUDITthenPURGE. TryREGENto refresh display.
- Fix: Check layer visibility, freeze/thaw, and use
Error: Crashes when opening/plotting
- Fix: Recover file and purge unused content. Check for problematic plot settings or custom plotters; switch to a standard plotter to test.
Error: Xref errors after audit
- Fix: Use
RECOVERALLon the host drawing and on each Xref. Reload Xrefs and repair each separately if needed.
- Fix: Use
Error: Large file size after repair
- Fix: Use
PURGE→Purge All,OVERKILLto reduce duplicate geometry, andSAVEASto write a fresh DWG. ConsiderWBLOCKto export cleaned model.
- Fix: Use
Tips and best practices
- Always keep backups: enable autosave and keep
.bakcopies. Before auditing, save a manual backup copy. - Use a trusted template for new drawings to avoid inheriting corrupt styles or objects.
- Run
AUDITandPURGEperiodically on working sets to prevent slow accumulation of unused definitions. - Keep AutoCAD updated; some corruption issues are fixed in updates.
- Before receiving files from external parties, request exports as DXF or ask them to run
AUDIT/PURGE. - Use
RECOVERfor files that won’t open andRECOVERALLif Xrefs are involved. - For bulk cleanup, script
-AUDIT,PURGE, and save operations with AutoCAD scripts or LISP routines. - If corruption persists, try opening the DWG in AutoCAD on another machine/version — this can reveal version-specific issues.
How often should I run AUDIT on my drawings?
Run AUDIT whenever you receive files from external sources, after crashes, or periodically for long-term projects (e.g., weekly or monthly depending on project activity).
Will AUDIT always fix a corrupted drawing?
No. AUDIT fixes many database inconsistencies, but severe corruption may require RECOVER, DXF conversion, restoring a backup, or manual reconstruction of content.
Can I automate auditing for many files?
Yes. Use the command-line -AUDIT in a script or LISP routine to run AUDIT and save files in batch. Many firms build automated routines combining -AUDIT, PURGE, and SAVEAS.
Is it safe to answer “Yes” when AUDIT asks to fix errors?
Generally yes, but always work on a backup copy first. Allowing fixes lets AutoCAD attempt repairs that usually preserve more data than not fixing.
What’s the difference between AUDIT and RECOVER?
AUDIT scans and repairs a drawing already opened in AutoCAD. RECOVER attempts to open and repair a drawing that won’t open normally. Use RECOVERALL if Xrefs are involved.
Can AUDIT corrupt a drawing further?
It’s unlikely but possible in rare cases. That’s why the first step should always be save a backup copy. If issues worsen, revert to backup and try alternative recovery methods.
How do I handle corrupted blocks or external references?
Try exploding and recreating blocks, use WBLOCK/INSERT to rebuild blocks in a clean drawing, and run RECOVER on each Xref separately. If Xrefs are corrupt beyond repair, request clean copies from the source.
Will saving as DXF always fix corruption?
Saving as DXF often removes DWG-specific corruption, but it may lose some custom objects, proxies, or object-enabler content. Test carefully and keep originals.
