Wednesday, January 8, 2020

Optimizing the AutoCAD drawing file: Purge, Audit & Recover

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 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
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)
Use the following drawing utilities to remove unused geometry and correct drawing database errors:
  • 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.
The listed commands can be used individually or in combination for maintenance and error checking. 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: 
  1. Open the drawing file
  2. Audit and fix any errors:
    1. Type AUDIT at the command line
    2. "Y" for Yes to fix any errors, then Enter
  3. Remove unused named objects from the drawing:
    1. Type PURGE at the command line.
    2. Enable all checkboxes checked on
    3. click Purge All
  4. Purge Registered Applications (from the command line):
    1. Type -PURGE
    2. "R" for Regapps (registered applications), then Enter
    3. "*" , then press Enter (the asterisk equates to All)
    4. "N" when asked to verify each name to be purged, then Enter
  5. 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:
 
  1. Close the drawing file
  2. Recover and fix any errors:
    1. Type Recover at the command line
    2. In the Select File dialog, select the problematic file
    3. Once error checking is complete the drawing will open
Note:
  • Depending on the amount 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. 
  1. Remove unused named objects from the drawing:
    1. Type PURGE at the command line.
    2. Enable all checkboxes checked on
    3. click Purge All
  2. Purge Registered Applications (from the command line):
    1. Type -PURGE
    2. "R" for Regapps (registered applications), then Enter
    3. "*" , then press Enter (the asterisk equates to All)
    4. "N" when asked to verify each name to be purged, then Enter
  3. Save the drawing
Method 3:

For AutoCAD 2012 and later versions, the PURGE and RECOVER command can be performed simultaneously by using the DWGCONVERT utility. This utility can also be used to batch perform these procedures on many drawings at the same time.
  1. To launch the DWG Convert utility, either:
    • With any drawing open, enter the DWGCONVERT command.
    • With no drawings open, click on the application menu and select DWG Convert.
  2. In the DWG Convert window, click on Conversion Setups.
  3. 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.
  4. In the Modify Conversion Setup window, select the Check and fix errors and Purge drawings options.
User-added image
  1. Set other conversion options as needed.
  2. Click OK and then Close.
  3. Load files to cleanup by either:
    • Clicking on the Add file icon and browsing to the files.
    • Dragging-and-dropping the files from Windows Explorer to the Files tree area.
  4. Select the newly created Conversion setup from the right-hand box.
  5. Click on Convert and follow additional instructions as applicable, depending on the Conversion setup settings.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home