Issue:
AutoCAD or AutoCAD vertical (.DWG) file corruption can be seen through one or more of the following symptoms:- File will open with errors.
- File hangs or crashes AutoCAD.
- Slow performance when opening, editing, and manipulating the file.
- Error messages when working in the file.
- Commands do not work or there is considerable delay in operation.
- Unexplained file size increases.
- Display/Regen problems.
- Drawing elements missing or shown incorrectly.
- Objects cannot be selected consistently.
Causes:
File corruption can be introduced in numerous ways, some examples are listed below:- Third-party applications running inside AutoCAD.
- DWG files created or saved by non-Autodesk or non-RealDWG products.
- AutoCAD terminated while saving the drawing.
- Old drawings used repeatedly over long time periods.
- Network anomalies (transmission errors, file locking, latent writing of data).
- Storage media degradation (bad sectors on a hard drive).
Solution:
General Clean Up
Use the following drawing utilities to remove unused geometry and correct drawing database errors. The commands can be found under the Application menu › Drawing Utilities:
- AUDIT (Command) - Evaluates the integrity of a drawing and corrects some errors.
- RECOVER (Command) - Repairs and then opens a damaged drawing file.
- PURGE (Command) - Removes unused items, such as block definitions and layers, from the drawing.
- -PURGE (Command) > RegApps - Removes RegApps from the drawing (available from the command line only).
Note : The listed commands can be used individually or in combination for maintenance and error-checking.
Additional Methods
The two methods shown in the following examples will perform the same tasks, although method 2 which uses Recover as opposed to Audit will do a more thorough job in detecting and fixing errors:
Method 1:
- Open the drawing file.
- Audit and fix any errors:
- Type AUDIT on the command line.
- "Y" for Yes to fix any errors, then Enter.
- Remove unused named objects from the drawing:
- Type PURGE on the command line.
- Enable all checkboxes checked on.
- Click Purge All.
- Purge Registered Applications (from the command line):
- Type -PURGE.
- "R" for Regapps (registered applications), then Enter.
- "*" , then press Enter (the asterisk equates to All).
- "N" asked to verify each name to be purged, then Enter.
- Save the drawing.
Note: Step 3 executes the dialog version of the Purge command, whereas step 4 uses the command line equivalent. This is because the option to purge Regapps is only available from the '-Purge' command.
Both steps 3 and 4 can be executed from command line. For step 3 use "All" to purge all entities.
- Command: -PURGE
- Enter type of unused objects to purge [Blocks/DEtailviewstyles/Dimstyles/Groups/LAyers/LTypes/MAterials/MUltileaderstyles/Plotstyles/SHapes/textSTyles/Mlinestyles/SEctionviewstyles/Tablestyles/Visualstyles/Regapps/Zero-length geometry/Empty text objects/Orphaned data/All]: A
- Enter name(s) to purge <*>:
- Verify each name to be purged? [Yes/No] <Y>: N
Repeat the command:
- Command: -PURGE
- Enter type of unused objects to purge [Blocks/DEtailviewstyles/Dimstyles/Groups/LAyers/LTypes/MAterials/MUltileaderstyles/Plotstyles/SHapes/textSTyles/Mlinestyles/SEctionviewstyles/Tablestyles/Visualstyles/Regapps/Zero-length geometry/Empty text objects/Orphaned data/All]: R
- Enter name(s) to purge <*>:
- Verify each name to be purged? [Yes/No] <Y>:
Method 2:
- Close the drawing file.
- Recover and fix any errors:
- Type Recover on the command line.
- In the Select File dialog, select the problematic file.
- Once error-checking is complete the drawing will open.
Note :
-
- Depending on the number of errors checked, it's good practice to use SAVEAS, renaming the drawing and keeping a copy of the original file. Then closing the file and run Recover again on the newly saved file.
- When working with a host drawing file and it's referenced files, use the RECOVERALL command to error check the references.
- Remove unused named objects from the drawing:
- Type PURGE on the command line.
- Enable all checkboxes checked on
- Click Purge All
- Purge Registered Applications (from the command line):
- Type -PURGE
- "R" for Regapps (registered applications), then Enter
- "*" , then press Enter (the asterisk equates to All)
- "N" asked to verify each name to be purged, then Enter
- Save the drawing
Method 3:
- To start the DWG Convert utility, either:
- With any drawing open, enter the DWGCONVERT command.
- With no drawings open, click the application menu and select DWG Convert.
- In the DWG Convert window, click Conversion Setups.
- Click New and enter a name for the Conversion setup.
- Optionally, select a Conversion setup other than Standard from the drop-down list to base the new Conversion setup upon.
- In the Modify Conversion Setup window, select the Check and fix errors and Purge drawings options.
- Set other conversion options as needed.
- Click OK and then Close.
- Load files to clean up by either:
- Clicking the Add file icon and browsing to the files.
- Dragging-and-dropping the files from Windows Explorer to the Files tree area.
- Select the newly created Conversion setup from the right box.
- Click Convert and follow other instructions as applicable, depending on the Conversion setup settings.
See Also:
- How to repair corrupt AutoCAD files
- DWG files increase in file size and file performance degrades in AutoCAD
- "Drawing file is not valid" when opening a file in AutoCAD
- Understanding backup and autosave files in AutoCAD
- About creating and restoring from backup files
- About repairing damaged drawing files
- Cursor lags or jumps on specific drawings in AutoCAD products