Back

Civil 3D: File Management

Working with Civil 3D files can sometimes be very aggravating!! Ok, ok, they are most likely ALWAYS aggravating. Slowdowns, crashes, missing information and all sorts of corruption can creep in if you’re not careful and sometimes it’s almost impossible to identify the cause.

Over the past 15 years or so I’ve seen a little of everything when it comes to Civil 3D files, and in this article, I want to walk you through a few things I look for when cleaning up files and/or recovering problem files.

Daily File Management

This is something you’ll want to do to every file you touch throughout the day. It takes five seconds to run these commands, but it can save you hours and hours of lost time and headaches. I run these several times a day on all the files I touch/save. This is the first thing I do when someone sends me a problem file!

I’d recommend a routine such as “-purge (regapps), Audit, purge, Audit, save” to finish up your file(s) at the end of each day.

  • -PURGE (Command Line), Type R for “RegApps”
    • This is NOT the regular PURGE command.  Even a “PurgeAll” can leave plenty of leftover junk in your files.
    • NOTE: Be sure to start with your xrefed files first and then move to the drawings where the files are being xrefed!
  • AUDIT
    • Audit runs a check on the drawing itself and corrects any errors within the database. It removes things that cannot be removed by the purge command, such as zero-length lines.
  • PURGE
    • Purge clears your file of anything you haven't used like line types etc. this helps reduce the size of your file.
  • Drawing Purge Add in

File Slow Down?

Slow files are something that just drives me absolutely nuts!! I’m such an impatient person and if I have to wait more than 30 seconds for any result, especially open/save, then something in my office may get broken! A few things to keep in mind:

  • LARGE SURFACES
    • There are a ton of things you can do when working with large surfaces. Things like simplifying surfaces, using No Show or Border only styles until you need to turn on contours, data clip, cropped surfaces, etc. But there is one thing that is overlooked by almost everybody! This would be the “Store Referenced Surface in Drawing Command Setting”:
      • In 2017, Autodesk introduced a new feature which stores the geometry of a referenced (data shortcut) surface. This setting is found by selecting the Settings Tab of the Toolspace by expanding the surface commands.
      • Taken from the Autodesk Knowledge Network, there are two options for this setting:
        • Yes: Saves the geometry of reference surfaces in the drawing. The drawing will become larger, but it will open more quickly unless the source surface has changed. The referenced surfaces will be visible even if the source drawings are not available.
        • No: Does not save the geometry of reference surfaces in the drawing. When set to No, the reference is checked every time the drawing is opened. The drawing will be smaller, but it will open more slowly.

  • LARGE IMAGES
    • Images from drone data and satellite imagery can really slow your file down at times.  Here are a few things I do to help avoid this as much as possible.
      • QGIS – This is a free program that can greatly reduce your image size.  I mean, who really need a 0.5” resolution photo? 3” resolution typically works just fine!
      • GEOLOCATION – Although the Bing Maps aren’t the greatest quality, and definitely not always up to date, this is a good way to have some preliminary images in your background.  Unload your larger images and this until you need to print or refer to the “main” images.  This can save a lot of time throughout the day!
  • LAYOUT TABS
    • Autodesk recommends no more than seven layout tabs per drawing. I recommend no more than two to three. Technically, you can add 256; most people on the forums say between five to ten layouts are the max they will use.
  • CIVIL 3D LABELS
    • Use data shortcuts and label live in the sheet files. Try not to label a really long profile, corridor, or large surface that spans multiple sheets. This can really slow down the performance because AutoCAD and Civil 3D will process/cache every object whether you are viewing it or not. Also, use XCLIPS.
  • DELAY TIME
    • When entering certain commands at the command line in AutoCAD, the program pauses or hangs for a moment before continuing to function.  Or, even more annoying, you input a command and hit enter, then it does a completely different command!
      • INPUTSEARCHDELAY – Type this into the command line and change the setting to anything (3000, 5000, etc.).

Some more time saving tips are below.  Some are very simple and save seconds, but seconds add up to minutes, and minutes add up to hours!

  • Layoutregenctl = 2 (To stop regeneration between switching between Model Space and Layouts).
  • Regenmode = 0 (To stop automatic regeneration after certain common tasks, like thawing a Layer).
  • Cachemaxfiles = 0 (To disable caching and delete files in GraphicsCache folder not in use).
  • Cachemaxtotalsize = 0 (Similar to No.3).
  • Taskbar = 0 (To increase maximize/minimize latency by only displaying current drawing of multiple open drawings in Windows Taskbar). Also stretched AutoCAD program window manually to screen width instead of letting Windows do it and increased the max/min as well.
  • Ssmpolltime = 600 (To lengthen auto refreshing of Sheet Sets when displayed).
  • Created Desktop Shortcut to AutoCAD temp folders for regular cleanup of leftover files.
  • Created new Desktop icon and removed "\UserDataCache" from path to increase startup - This helped a great deal!
  • Tweaked other Setvariables from the start of install like: Whipthread = 3, Isavepercent = 90, Paletteopaque = 0, and Draworder = 3.

Misc. Commands

Anytime I get a drawing from an outside source, especially architects or landscape architects, I go right to the OVERKILL and MAPCLEAN commands. The WBLOCK command is a great tool to block out just the items you want, or even to completely rebuild a very troublesome file.

  • MAPCLEAN (Command)
    • Drawing Cleanup actions can be used to detect map errors (for example, duplicate objects, undershoots, or zero length objects), simplify complex 2D maps, and to weed and supplement 3D polylines. Because Drawing Cleanup can alter your data, make a backup of your data before cleaning up a map.
    • Drawing Cleanup affects objects on layers that are OFF. It does not affect objects on layers that are FROZEN. It is recommended that you use drawing cleanup on a layer-by-layer basis, or on selective sets of layers. Avoid using automatic cleanups for all objects on all layers.

  • OVERKILL (Command)
    • Removes duplicate or overlapping lines, arcs, and polylines. Also, combines those that are partially overlapping or contiguous.
  • WBLOCK (Command)
    • This is the number one way to really purge unused layers, blocks, REGAPPS, and any other funky junk that someone has done to that drawing. It will even remove bad settings that a user has changed! The Entire File option will take drawing layouts with it, which is great if you have a corrupt Sheet file.
    • WBLOCK does a good job removing it as long as you select the objects in the drawing and PURGE and AUDIT the New Block.dwg.
    • In some instances, WBLOCK will carry over corruption. It is rare. LandXML does not carry across corruption. If it doesn't come across in the LandXML then it is best to rebuild what it didn't bring across. I understand that requires more work up front but in the long run it can prevent a larger loss down farther down the road.

File Recovery

No matter how diligent you are with keeping files clean, you will at some point come across a file that just refuses to stabilize and needs to be further recovered.  Here are some additional tools that are helpful.

  • DRAWING RECOVERY MANAGER
    • Drawing recovery manager AutoCAD uses to Access “Recoverable Drawings” after a program or system failure.  This is a great way to show the recover file, the autosave file and any temporary files. This speeds up the file recovery process and lets you access those files from one central location.  Simply type in DRAWINGRECOVERY into the command line to get the panel to appear.

  • RECOVER
    • Run RECOVER on corrupt drawing file
  • RECOVERALL
    • Run RECOVERALL on corrupt drawing file (Repairs a damaged drawing file along with all attached xrefs).
  • WHOHAS (Command)
    • You can use WHOHAS to find out who has a specified drawing file open.
    • Also, check for and delete the hidden dwl and .dwl2 files in the drawing folder directory.
  • INSERT THE CORRUPTED DRAWING AS A BLOCK:
    • Open a blank DWG and run the INSERT command (or CLASSICINSERT).
    • Select the problematic file.
    • If it inserts, run EXPLODE and select the inserted block.
    • Run an AUDIT command.
    • Run a PURGE command.
    • SAVEAS.

RECOVERY FILE TYPES

Recovering from a backup (.bak):

  • Locate the corrupted drawing directory or storage location.
  • Find the drawing file backup denoted by the .bak extension.
  • Rename the .bak extension to .dwg.
  • Attempt to open the newly created .dwg file.
  • Note: to preserve the original backup file, make a copy before changing the extension.

Recovering from an autosave file (.sv$):

  • Locate the autosave folder location (typically C:\Users\\AppData\Local\Temp\).
  • Find files with an SV$ extension. Look for files with a similar name and different times and dates as compared to the corrupted .dwg file.
  • Rename the extension from .sv$ to .dwg.
  • Attempt to open the newly created file.

Try opening the drawing using DWG Trueview:

  • Convert the drawing using DWG Trueview to an older DWG version.
  • Attempt to open the newly created file.

Instead of opening the whole File, open the file partially (See To Partially Open a Drawing).

  • Select a view and select one or more layers.
  • You can load only geometry from model space views that are saved in the current drawing.

Conclusion

There are many ways to help yourself, and the company, save a lot of time and rework when it comes to your Civil 3D files.  Hopefully this helps you keep your hair in place and blood pressure down!! I’d love to hear from you and what you do to keep files clean and what has been successful in your practice.

Appears in these Categories

Back