Working with outside DWG’s & File Clean Up

Starting a new project:
When starting a new project, the correct workflow is to open a “New” file that is associated with a company standard template. If you do not have a standard template, I suggest creating one that includes things used often like dimstyles, layers, titleblock layouts and blocks.

A workflow that should be avoided is opening an old project file and doing a “save-as” and deleting things that are not needed.



Working with Outside Xrefs/ Dwgs:
•    Always clean these files. Start with:
•    “Audit” and fix any issues it finds (see 3C). 
•    “Purge” and remove all purgeable items (see 3B below.) 
•    “-PU” and remove the “regapps” (see 3D.) 
•    Detach any unreferenced xref’s or point them to the correct file to reload. 
•    “Overkill” to remove any duplicate lines and segments (see 3e.)

If the file that is sent has multiple disciplines in it, you can select a few elements/ blocks do a select similar to get the rest of them and “wblock” it out to a new file that can be x-referenced back into the file at a later time. Items that are not needed can be deleted to keep the files smaller. 

Sometimes the problem can be due to the xref files and not the current drawing. Open the xref files and run the steps above to the files, save and close. Reload the xref in the original file. 

**Never work in external business partners drawings when possible. Instead xref their file into a clean new file created by the standard template. **


Clean Up Tips & Tricks:
a.    Recover: This command can be used to fix drawings that are corrupt to the point they will not open. For these situations I open a blank new file and then run the “Recover” command and then path to the dwg in question. Once the command has run hit “F2” to review everything. Always scroll to the top to see what it did. Here is an example of a Recover:
 


Then select “Close” to close the dialog box. Then hit “F2” and scroll to the top:
 


The command “RECOVERALL” can be used to recover the xrefs as well. 

b.    Purge: This will flush or purge all unused, orphaned, or zero-length geometry items in the drawing. Type “PU” or “Purge” and check the following:
 
This will remove all the unused, nested, zero length, empty text and orphaned data items from the file. 

c.    Audit: This command will audit all the items in the drawing and check for any issues, errors or inconsistencies and fix them. These are things that could be causing slowdowns, crashes or other issues. Type in "AUDIT", say “Yes” to fix the items. To review everything, it fixed hit the “F2” tab. If you wish to keep a record of the errors this command fixes you can set variable “AUDITCTL” to 1 and a text file will be created once the command is finished with an .ADT file extension. It will be in the current drawings folder and can be viewed using notepad or a program similar. 

d.    -Purge: This command is used to remove the “regapps” that can add up over time. These will cause slowness of files, crashing and corruption. Regapps are the byproduct of objects with xdata. Type in “-PU” and select enter, type “R” for “Regapps” and select enter. When prompted for “Enter name(s) to purge, hit enter again, then type “N” for no. To see the list of the regapps it removed hit the “F2” key. 

As a Side Note, if you use these drawings as XREF's, then I generally recommend changing this System Variable to 1  (one) from the default of 0 (zero):
XREFREGAPPCTL (System Variable)
Controls whether the registered application (RegApp) records stored in an xref being loaded are copied to the host drawing.


e.    Overkill: this tool eliminates all overlapping or duplicate items in the drawing. It also combines those that are partially overlapping. Type in “OVERKILL” and hit enter, then it asks to select objects. You can type in “ALL” for all items or window your selection then hit enter again.
 
In the dialog box you have the option to filter which duplicate objects will be deleted and how they will be selected. After selecting the options select “OK” to finish command. Here is an example of what can be removed:
 
For more information on this command see this blog.

f.    WBlock: Allows you to save out selected objects or a whole drawing into a fresh uncompromised dwg. It can also be used to fix a corrupt drawing that is crashing or freezing by wblocking the drawing out to a new file. Type in “WBLOCK” and hit enter:
This dialog box will appear and there are many options to choose from. Starting in “Source” you have 3 options on what to select from. There is Block, Entire drawing and Objects (that you will need to select). Pick the option that is best for what needs to be wblocked. The next step is in the section call Base Point. This allows you to pick a base point or for it to come in automatically at 0,0,0. The next section called Objects allows you to select the objects and then decide what to do with them. You can Retain, Convert to block or Delete from drawing. There is also a quick select feature in the Objects section that you can use. Finally, the last step is to give this new file a path location and name and set the drawing units. 

g.    Another great option for files that won’t open due to corruption is using the Web version of AutoCAD. Go to Web.Autocad.com, sign into your Autodesk account and upload the file there. Once uploaded, open the file and run an audit and fix issues, then run a purge and purge all and lastly a "-PU" to clean up the regapps. This should get the file usable again in the desktop version of AutoCAD. If it still has issues, reopen in the web version and wblock out the file. 



Standard Steps for Cleaning up Files:
1.    Take file that was sent by outside source and put in folder. Open with a “RECOVER”. To do this open a blank file. Then type in “recover.” Path to the drawing you want to clean up. 

2.    To review what the recovery has done, hit the “F2” button. You can then scroll through and see everything it looked at. Then do a “Save-as” and add “-fixed” at the end or save over the original file. 

3.    Next type in “-PU”. Then “R” for regapps, then enter for the “Enter name(s) to purge <*>:” followed by “N” for no to verifying each name to be purged. Hit the “F2” key again to see how many regapps it removed.  **If there is any freezing or hanging you may need to use the web version of AutoCAD to fix it. Go to web.autocad.com (See notes at the end of document)


4.    Type in “OVERKILL” then type in “ALL” then hit enter, and enter again. In the “Delete Duplicate Objects” pop up screen you can add additional options or leave as is, and then select “OK.”

5.    Save file. 

6.    Next, purge all items that are purgeable. Type in “PU” and hit enter. Uncheck “Confirm each item to be purged”. Check all the following that you are allowed to check:

  


7.    Click “PURGE ALL”.

8.    Go to “Find Non-Purgeable Items”, select the plus sign next to blocks. Look for any with A$C and clean up. 

9.    If you are still having issues, wblock the whole file out to purge out all the bad. 



Workflows to Avoid:
1.    Opening any old project file, doing a save as and naming as new project. 
2.    Windows cut and paste (Control + C/ Control + V) This can copy in corruption and issues. Instead use Design Center to copy blocks, layers, dimstyles etc from other drawings. (control + 2 turns Design Center on and off)
3.    Do not work in external business partners drawings. Instead xref overlay them into your drawing. If you need to send out your file and need the xrefs to go with it, use the “ETRANSMIT” command to process the file and the references. 
4.    Make sure blocks come from a trusted source. It only takes one bad block to corrupt a whole drawing.
5.    Avoid custom hatches that can cause issues. Instead, replace them with standard hatches. 
6.    Avoid using large complex hatching to fill in walls. Instead, break down the hatching into smaller segments. 
 

About the Author

Heather Volk

Sr. Technical Support Specialist, Building Solutions<br><br>Heather is responsible for responding to customer requests and helping them address technical challenges in a timely manner. She is an experienced Computer Aided Design Manager with a demonstrated history of working in the construction industry. She has strong arts and design professional skills in AutoCAD, plumbing, computer aided design (CAD), project estimation, and facility management, and a history of providing training and technical support.

More Content by Heather Volk
Previous Article
AutoCAD Electrical Freezes on Splash Screen
AutoCAD Electrical Freezes on Splash Screen

Suggested solutions to AutoCAD Electrical Freezing on the Splash Screen

Next Article
Text is hard to read in drawing DWFs in the Vault Thin Client
Text is hard to read in drawing DWFs in the Vault Thin Client

Producing text that is clear and sharp makes drawings easier to read in the Vault Thin Client.