Tuesday, December 17, 2013

How to recover and fix problematic or corrupt DWGs in AutoCAD

This is a great resource for AutoCAD users. Troubleshooting corrupt DWG files - TS22753433

Usually there is a way to correct drawings with technical problems.

Issue
An AutoCAD DWG file cannot be opened and causes AutoCAD to show error messages or alerts, or to freeze or crash.

Open Drawing - Damaged File - The drawing file requires recovery. Errors were detected in the drawing. The file cannot be opened without being recovered.

The drawing file requires recovery.

Drawing file is not valid.

Drawing file is not valid.

Cause
Possible causes of file corruption:

  • Network (transmission errors, file locking, latent writing of data)
  • Storage media degradation (bad sectors on a hard drive)
  • Defective or failing RAM
  • Operating system issues
  • Power surges
  • 3rd - party applications running inside the Autodesk product
  • DWGs created or saved by non-Autodesk non-RealDWG products
  • AutoCAD terminated while saving DWG (less frequent)

Recommendation: Audit and purge before saving

Solution
If a file cannot be opened, take the following steps:

  • RECOVER command
    --Recovers a selected drawing file
    --If successful, open and run AUDIT command
    --Evaluates drawing integrity and possibly more error correction
    --Set system variable AUDITCTL=1 to create a report of audit results

The drawing file was recovered.

  • RECOVERALL command (introduced in AutoCAD 2008)
    --Recovers a selected drawing file
    --Attached and nested xrefs are also opened, repaired, resaved, and closed
  • INSERT and EXPLODE
  • Start a new DWG with no template
    --Run INSERT and selected the corrupted drawing
    --Check the “Explode” option

If a file can be opened but still shows signs of corruption, take the following steps:

  • RECOVER and AUDIT
  • PURGE command
  • Copy and Paste into a new drawing
  • AECTOACAD (-EXPORTTOAUTOCAD)
    --Exports to a pure AutoCAD file in selected drawing version
    --Strips potentially corrupt custom objects
  • WBLOCK command
    --Set all layers ON, THAWED and UNLOCKED
  • WBLOCK all objects in the drawing to an external block file
  • INSERT the resulting file as block into a new drawing (check the “Explode” option or EXPLODE the block after inserting)
  • AUDIT and PURGE
  • DXFOUT/DXFIN
    --DXFOUT to create a new .dxf file
    --Start new drawing and DXFIN to import the new .dxf file
    --Also try exporting as AutoCAD 12 DXF
  • XREF into a new drawing and BIND

See also Recover damaged drawing when RECOVER command not successful - TS19369

  • Using Windows Explorer or the Windows Find feature, search the entire hard disk for autosave (SV$) files or backup (BAK) files with the same name as the drawing. Rename those files so that they have a DWG extension, and you may be able to open them. (By default, SV$ files are in the %TEMP% folder and BAK files are in the same directory as the DWG file.)
  • Use WBLOCK command to insert the corrupt drawing into a new drawing. Insert at the 0,0,0 coordinate.
  • Open the drawing in a previous release of the software, if available (AutoCAD only).
  • Export the drawing as a DXF™ file, then import the DXF file.
  • If the drawing was last saved in an older format, try using partial open to load the drawing one layer at a time until you find a layer containing an error. Then repeat, skipping that layer next time. See related documents for instructions on using the partial open feature (AutoCAD only).

Drawing Recovery Manager (command DRAWINGRECOVERY)
Displays a list of all drawing files that were open at the time of a program or system failure. You can preview and open each drawing or backup file to choose which one should be saved as the primary DWG file. After a program or system failure, the Drawing Recovery Manager opens the next time you start the application. Drawing Recovery Manager displays a list of all drawing files that were open. The System Variable RECOVERYMODE controls whether drawing recovery information is recorded after a system failure and whether to show the Drawing Recovery Manager or not.

If you want to help yourself, Autodesk and other AutoCAD users make sure to send in any errors to Autodesk when you see the Customer Error Report dialog box (CER).

Finally a solution that sometimes helps if AutoCAD cannot fix the problem is to try to fix the drawing in another program that can open and save DWG files. The more users having the similar problem the better chance it will be fixed in a service pack or future version. Eventually you might get an email saying the problem is fixed.

You may find JTB World’s SmartPurger useful to batch process drawings that needs to be fixed. It includes Audit and Purge functionality as well as a lot more.


Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner