After the Crash
©2004 Central Visual Information Systems, Inc.  Reproduction of this document is prohibited.

Recovering Lost Information

 

Table of Contents

This document is intended to help you recover and recreate lost AutoCAD data.  It applies to all 2000+ releases of AutoCAD.  The techniques described here can also be used with vertical products.

These products include: AutoCAD, AutoCAD LT, Map and Map 3D, Civil 3D, Land Desktop, Architectural Desktop, Building Systems

Unless otherwise specified, this document does not include information on specific bugs or errors.  It approaches problems assuming that little to nothing is known about the causes.  There may be an easier fix for your problem, and we encourage you to contact your technical support provider before attempting to recover data.

This document is meant for technical support, so it only skims over prevention and maintenance tips.  CVIS also sells a number of papers concerning these topics in depth.  Email dkohr@cvis.com for more information.  Also, CVIS’ unique immersive training courses, CAD Pilot Jump School and CAD Manager Boot Camp, include comprehensive sessions dedicated to network and data management.

Finally, this document does NOT promise to recover all lost information.  Crashes, data loss, and bad luck are a fact of life in the Information Age.  These are just a few of the techniques that have proven most useful.

The tips, tricks, examples and suggestions outlined in CVIS technical documents are suggested for use at your own risk. Document contents are subject to change without notice. CVIS is not responsible or liable for damage or events that may occur as a result of following suggestions from any CVIS technical document.

Recovering Lost Information

The Immediate Aftermath

Get Up to Date

Back Up Your Files

If Your Drawing Opens…

The Audit and Purge Commands

XRefing Your Problems Away

Reconstruct Your Drawing

Versions and Conversions

Cleaning Up Your Drawing in Autodesk Map

If Your Drawing Doesn’t Open…

System Save Options

Fixing xRef Problems

Recovering or Recreating Your File

The Query Function in Autodesk Map

Partial Open

Prevention (or If You’ve Gotten this Far, You Probably Don’t Need this Part)

Save.  Save Again.  And Save One More Time.

Your System – Take Care of It!

Your Files – Protect Them!

Your Resources – Use Them!

 

 

The Immediate Aftermath

We’ve all had terrifying moments when our work is interrupted by premature program closure, or when lost or changed data prevents a file from opening and/or saving.  Sometimes the problem is accompanied by an error message and a prompt to save data for future recovery.  Sometimes, the program stops responding suddenly and apparently for no reason, or gets stuck in a frustrating and endless loop of error messages.  On occasion, the screen flashes to the desktop view with no warning, and no evidence of trouble.  At other times, the file just refuses to open altogether.  Data losses share all the features of work-related computer issues:  they are unpredictable, they are unavoidable (though not irreducible), and they usually pop up at crunch time.  This document will cover the features in AutoCAD which can help you recover all or part of your lost data.

Don’t Panic!

AutoCAD has a number of data recovery tools to retrieve most or all of your lost data back into your drawing and project structure.  If you think you have lost some of your data, don’t panic.  Before you do anything, take a deep breath, get some fresh air, stand up and stretch.  Nothing turns a small problem into a big problem faster than rushing in headlong before you understand the nature and scope of the issue.  Do NOT choose to save data for future recovery, unless you’re not sure when your last save was.  Doing it this way, you will lose whatever you’ve worked on since the last save, but you will also avoid saving errors back to the drawing database.

Gather Information

While the event is still fresh in your mind, try to document everything that happened during and immediately before and after the crash.  Were there any error messages?  What did they say?  What have you done since the last time you saved your work?  What other programs were running on your computer at the time of the crash?  What function were you using within the program when the crash happened?  Were you importing data, and if you were,  from what filename and file type?  Will the drawing open?  If so, can you view all or part of your drawing?  Can you view all the layout tabs?  Can you plot?

The most seemingly obvious false assumption can be the key to your problem, so no detail is too mundane at this point.  The purpose for gathering information is two-fold:  first, it will create a picture of the problem in case you need to come back to it later, or call on outside help.  Secondly, it will give you time to proactively think about the problem without changing its parameters.

Be Sure that Something Is Lost

AutoCAD and its vertical products are becoming more and more object-oriented and data-driven.  In many cases, just because an object doesn’t show in model space does not mean that it is not there, and just because data is no longer attached to a project doesn’t mean it doesn’t exist.  If you’re using the software’s object-oriented behavior to its greatest extent and using styles wherever possible, these data-derived displays are quick and easy to recreate to prior specifications.  CVIS always recommends our CAD Pilot Jump School, which is geared toward understanding this data-driven nature of the software, and how it can make your job easier.

Is it the Data or the Program?

Corruption of the data in your drawing and data files is only one of many possible reasons why you may not be able to access your drawings.  Before you try to recover information, make sure it’s recovery, not reinstallation, that needs to be done.  If you can open your drawing on another computer or user profile, then it is likely a problem with your install of the software or a network issue.  Also, try to open another DWG file with the same program.  If it exhibits the same problems, it is most likely the program, not the data, that is causing you trouble.  This solution can be anything from installing a service pack to a complete uninstall/reinstall, however in any case your data and drawing will be unaffected.

Get Up to Date

Lots of errors creep up over time, and can be triggered randomly by other programs, your operating systems, computer hardware and drivers, and/or a whole range of other unpredictable interactions with your Autodesk software.  AutoDesk’s development teams issue periodic service packs to remedy many of the most common and troublesome of these errors.   Losing data is a good prompt to catch up on all those system updates you’ve been putting off. 

Operating Systems

Using your Start menu or Windows Search feature to find it, run a Windows Update.  You should run this as often as possible, if only from a security standpoint, as these updates usually plug holes in your system that hackers can use to access your files.  They will also make your system more stable, preventing crashes that can corrupt files.

Autodesk Service Packs and Patches

Check the version of your Autodesk product.  Go to Help>>About.  This window has information about the version of your software, as well as any service packs installed on it.

The Autodesk support website includes links to download service packs for all the company’s products.  Download the most recent service packs for the program you are using, as well as any patches, and be sure to thoroughly read the readme file on the same web page as the service pack information.  There is not a uniform process for installing all Autodesk service packs.  Also, be sure you have the correct  service pack for your version of the software, or it will not install.  Please note, not all products have service packs. 

Back Up Your Files

All data recovery mechanisms in AutoCAD must look at your data, and fix any errors they find in that data.  This means your data files will be opened and changed by all of these processes.  It is possible that one mechanism will cause irreversible data loss.  In most cases, you have no other choice.  However, each data recovery mechanism functions slightly differently, and one way may be better than others.  It is good to keep a record of your corrupted file, at least until that phase of your project is complete.

It is tempting when backing up files to create a new directory.  There is often nothing wrong with this idea.  However, considering the interconnected nature of AutoCAD, as well as its dependence on hundreds of support. library, and project files, its a good idea to simply duplicate and rename your files.  A good way to ensure that the file will not be accidentally opened is to append a suffix to the file extension.  For instance, MyDrawing.dwg becomes MyDrawing.dwg_corrupt.  Since Windows recognizes file types by their extensions, this will prevent AutoCAD from opening your file.  To reopen, simply take the suffix off the extension.

There are several files that you will need to back up.  If your file will open, use File>>eTransmit.  This will create a carbon copy of you DWG and any referenced files, fonts, print drivers, and data files, and collapse it into one folder.  If your file will not open, copy the DWG file, first and foremost.  Look for a file with the same name as your drawing file, but with a .bak extension, and back this up as well.  If you have any xRefs in your drawing, it might be a good idea to back these up as well.  It is a good idea to use the Windows search feature (Start Menu>>Search/Find) and search your entire C drive for your filename.  This alone could save you from having to recover your drawing if you find a version you recently saved

If Your Drawing Opens…

If the drawing will open you have a very good chance of recovering most, if not all, of your lost data.  There are several commands that can be accessed only from within a drawing that will allow a user to detect and possibly fix files, or at least rewrite drawing data to a new file.

The Audit and Purge Commands

The Audit command is AutoCAD’s built-in error-detection and cleaning function.  In addition to recovering data, it can and should be used periodically to catch problems before they grow to the point where they can cause crashes.

o        From the File menu, choose Drawing Utilities>>Audit, or type AUDIT in the command line.

o        At the Fix Any Errors Detected? Prompt, enter yes.  Audits are done in several passes.  The total number depends on your specific drawing, but the results from each pass are recorded in the command line, along with the total number of errors detected.

o        Repeat the audit procedure until AutoCAD finds 0 errors in your file, or until the number of errors found by subsequent audits oscillates between two or more values.  This is necessary because cleaning up errors will often leave hanging references in the database when corrupt data is excised.

All fixed objects are placed in the previous selection set in your drawing.  This set is only created from the most recent audit.   The output from the recovery audit is written to an ADT log file if the AUDITCTL system variable is set to 1 (on).

If the Audit command is the error cleaner, then the Purge command is the error trash collector.  It removes any unreferenced items in your drawing – unused layers, blocks and xRefs whose referencing objects have been deleted, unused block definitions, dimension styles, layers, linetypes, and text styles.

o        From the File menu, choose Drawing Utilities>>Purge, or type PURGE in the command line.  This will bring up the Purge dialog box.

o        From here, you can view the purgeable and non-purgeable items in your drawing using the tree viewer.  To perform a full purge, select All Items.

o        Select Purge Nested Items.  This will purge items even if they are referenced by other unused items.  For instance, if an unused block definition uses an otherwise unused text style, this box will allow the text style to be purged.

o        Select OK and Close. 

A Purge should be performed after all Audits to remove any error-carrying blocks and references.  In addition, it is a good idea to run Purge regularly even if you have no visible errors in your drawing.

Xrefing Your Problems Away

External References (XRefs) cause a large portion of data errors.  Open all your XRefed drawings one-by-one.  You can find what XRefs are attached to your drawing by going to Insert>>XRef Manager, or by typing XREF into your command line. 

If any of them displays similar errors or won’t open, detach it from your drawing.  Then close your drawing and reopen it.  If the problem is gone in your main drawing, you can try other steps in your XRef drawing and reattach the XRef when it is recovered.  Also, make sure all XRefed drawings are saved in the same version of AutoCAD as the main drawing.

The problem can also reside in the links between the XRef and your drawing.  Try unloading all your XRefs, closing your file, reopening it, and reloading your XRefs.  If this doesn’t work, you may detach and reattach your XRefs.  You will have to re-position and re-scale all of them if you choose this step, so you may want to save it for later in the process.

One very common source of drawing errors, particularly in layouts, is the use of associative hatches with xRefed drawings.  The root of this problem resides in the way that AutoCAD loads drawing components.  In particular, hatches are loaded after primitives and blocks, but before xRefs.  If there is a hatch in your drawing that is associated with an object in an xRef, AutoCAD will try to draw the hatch before the xRef that defines it, which will cause an error.  The work-around is to either not use associative hatches, and just redo your hatching when you modify an object, or else draw a perimeter in your master drawing using point from the xRef, and using that as the basis for your hatch.  Perform a purge on all unused hatches.

 

Reconstruct Your Drawing

If nothing else works, you can use several of the tools in AutoCAD to quickly and accurately reconstruct your drawing.  In addition to using this procedure to recover from errors and crashes, it is a good idea to do this periodically to prevent any hidden errors from manifesting themselves catastrophically.  For most base AutoCAD and Architectural drawings, this can be quite simple.  For drawings using a lot of outside data sources, namely Land Desktop and Map drawings, the reconstruction process is much more involved and can be akin to redrawing an original copy, so you may want to try other measures first.

Use WBlock to Transfer Your Drawing Components

The first data to replicate is the drafted data in your project.  These are the AutoCAD primitives, blocks, and objects that show up in your display. 

o        Type WBLOCK in the command line.  This will bring up the Write Block dialog box. 

o        To avoid bringing over any unselectable objects, select the Objects radio button (rather than the Entire Drawing radio button).

o        For a base point, define 1,1,1 or some other non-origin point.

o        Make sure the Retain radio button is selected in the Objects section of the dialog box, and press the Select Objects button.  The Write Block dialog box will temporarily disappear, showing your screen.

o        Make sure you’re in the Model tab, and zoom out on your drawing (use your scroll wheel if you have one) until your entire drawing is visible.  Draw a selection window around the entire drawing.

o        Press Enter to confirm selection.  This will bring the Write Block dialog box back

o        In the “Destination” area, specify a file path and name.  You will want to save it to the same location as your current file to avoid linking problems with your outside files, however be sure that you give it a different name than any other files in the project.  A naming convention like MyDrawing_WBlocked.dwg is useful.  You can use the “…” button to browse your computer’s files.

o        Press OK.  You have now created a file with all the drawing information from your currently corrupt one … and hopefully with none of the problems!

o        Open this file and select all drawing components.  Move the entire block (-1,-1,-1) to get it back to the origin. 

Use Design Center to Transfer Drawing Layouts and Styles

You can also transfer styles and layouts from your corrupt drawing to your new drawing.

o        Go to Tools>>Design Center or press Ctrl+2 to bring up the Design Center Palette.

o        Using the folder tree on the left side, navigate to your corrupted .dwg file

o        Click the plus to the left of the .dwg file.  This shows the components of your corrupt drawing that can be transferred to the new one: Blocks, Dimstyles, Layers, Layouts, Linetypes, Textstyles, and xRefs.  When you click on a category in the tree, any instances of the category in the drawing will show in the window on the right.  To bring these over into your new drawing, simply drag and drop them into model space.

o        The XRefs should attach at the correct locations, and the layouts will have the same scale, coordinate system, display properties, layers, locks, etc.  In essence, they are cloned using the data from the same objects in your original drawing, but recreated step-by-step in the new one.

o        Be sure to run the Audit command on your drawing after importing each layout, xRef, or style.  If nothing else, this can help narrow down the source of your error.

o        You can also do piecemeal insertion of blocks with the Design Center if you are unable to use the WBlock command.

Transferring Other Data in Vertical Products

In Land Desktop and other Civil products, it is a good idea to create your new file in the same folder as the old file.  If you must move it, be sure to copy all other folders (dtm, SHP, cogo, align, etc.) in your project folder, and to create a new project folder for it to reside in.  The general rule with Land Desktop is that as long as the project folders follow the drawing it should be fairly simple to recreate the drawing.

In Architectural Desktop and Building Systems, you can carry over your AEC Object Styles through the Style Manager.  All display system representations, sets, and configurations can be accessed and copied through the Display Manager.  You may find it easier to simply reconstruct sheets from named views using the Project Navigator, but if one of your construct drawings is damaged you will probably want to recreate it.

 

 

 

 

 

 

 

Versions and Conversions

Just because your version of AutoCAD or related products cannot find or display your data doesn’t mean that it is irretrievable.  There are a number of reasons that a drawing is incompatible with its hosts, and just as many ways to fix the problem.

DXF Import/Export

AutoCAD supports the DWG drawing format, as well as the less well familiar DXF format.  DXF saves in a more general format than DWG, and can be exchanged with fewer difficulties among various CAD programs.  Also, because DXF changes the structure of the information it stores at relatively basic levels, it can weed out many errors that may be present in the DWG file. 

o        From the File menu, choose Save.

o        Change the File Type to a DXF file, such as AutoCAD 2004 DXF.

o        Close the current drawing. Then from the File menu, choose Open or Recover.

o        Choose to open or recover the DXF file you just created.

o        Save the repaired DXF as an AutoCAD 2004 Drawing (DWG).

Opening with a Later Version of AutoCAD

Later releases often have fixes built in for common problems, and if their file formats are binary compatible, the functions inherited from the earlier release are generally more stable.

If you own a later version of AutoCAD, try opening your file in the other version. 

o        Open a later version of your AutoCAD software.  Go to File>>Open and navigate to your corrupt file.  Click Open.

o        Go to File>>Save As…  Under Files of Type, make sure the pulldown menu shows the current (newer) version of Autodesk software

o        Navigate to your file folder. Name your drawing (don’t use the same name, but rather call it so that you know it was saved in another format), and press Save.

o        Close the current drawing.  From the File menu, choose Open or Recover.

o        At this point, if your data appears intact you can save back to the original file format

o        In 2004 and later, this can be accomplished by going to File>>Export to AutoCAD.  You will need to download a migration tool to save back to releases earlier than 2000.  This can be downloaded from support.autodesk.com by searching for “Migration Tools.” 

o        In earlier releases, this can be accomplished by going to File>>Save As… and changing the Files of type… pulldown to your desired file format.

o        If your data is still corrupt, you may try going through the recovery mechanisms in the new version of the software, then saving back when you have recovered as much data as possible.

Saving to and Opening with an Earlier Version of AutoCAD

Older releases often will simplify some of the drawing components that they do not have the capability to understand.  This can cut some functionality out of the drawing, but also can filter out errors.  In addition, many block libraries in use today were originally drawn in AutoCAD R14 or earlier, and either never updated, or just saved to the newer version without redrawing.  They have a better chance of opening with the version in which they were created.

o        If you can open your drawing, try saving it back to an earlier version.  Be sure not to use the same name, but name it such that you know it was saved in a different format.

o        In some 2004 and later releases, this can be accomplished by going to File>>Export to AutoCAD.  You will need to download a migration tool to save back to releases earlier than 2000.  This can be downloaded from support.autodesk.com by searching for “Migration Tools.” 

o        In other releases, this can be accomplished by going to File>>Save As… and changing the Files of type… pulldown to your desired file format.

o        Exit out of your Autodesk software.

o        Start up your current version of AutoCAD.  Go to File>>Open and try to open your drawing.

 

o        If you cannot open your drawing, or do not have the option to save back to an earlier version, you may download the free Batch Drawing Converter from the Autodesk website.  This will convert your DWG files across a range of formats.

o        Attempt to open or recover the earlier-format drawing in either your current release of the software, or the earlier release.

Object Enablers

If your drawing, or parts of it, were created in a later version of AutoCAD, or in one of the vertical products that is not installed on your computer, you will receive a message when you open it saying that proxy objects will not be displayed.  If this is the case, Autodesk offers free downloads of software called Object Enablers that will allow you to view and manipulate, but not change, these objects.  To have any ability to modify them, you must purchase the software in which they were created.

 

 

 

Cleaning Up Your Drawing in Autodesk Map

If you own Autodesk’s Map software, you will find it contains a drawing cleanup utility.  While it is not generally prescribed for data recovery, we at CVIS have seen instances where it has fixed errors in drawings.  However, be aware that it can also create errors in drawings.  It has a fairly complicated interface, and since it is not an error recovery mechanism, but rather a user-defined cleanup tool, it is easy to delete objects, break, trim, and extend lines, and close polylines unintentionally.  It is recommended that you take a very active role in the cleanup process, use the provided preview tools, and start with very obvious errors and work your way down.  Cleaning up even a medium-sized drawing should take half an hour or more.

Follow the steps below to use the drawing cleanup utility.

o        From the menu bar, choose Map>>Tools>>Drawing Cleanup.

o        Specify which objects you want to clean up and anchor. Anchored objects are used as reference points and are not altered during the cleanup process.

o        Select cleanup actions and set options for each action, such as tolerance.

o        Specify how to correct errors. You can have Autodesk Map correct errors automatically (but this is not recommended).  You can also review the list of errors, examine each error in the map, and then decide whether to correct the error, remove it from the list, or mark it so you can review it in more detail later.

o        Indicate how to treat original objects after the cleanup is complete. You can modify the original objects, keep the original and add new objects, or delete the original and add new objects.  Since you’re trying to get rid of errors, the safest choice is to delete the original and add new objects.

o        Configure error markers if you are stepping through, reviewing, and deciding how to handle errors yourself. You can specify the size, shape, and color of the marker used to confirm/check the errors for each cleanup action. You can specify a different marker for each action.

o        Save your drawing cleanup settings in a profile for later use (optional).

o        Click Finish to start the drawing cleanup process.

o        If you choose to have Autodesk Map correct errors automatically, they will be corrected immediately according to the settings you specified. If you choose to review errors before making any corrections, the Drawing Cleanup Errors dialog box will appear.  This is where you can review errors and decide how to handle them.

o        Repeat the cleanup process in the same way until either 0 objects have been created or deleted, or until subsequent cleanups oscillate between two or more values.

o        Repeat the cleanup process, refining your tolerances and preferences to weed out more subtle errors.

If Your Drawing Doesn’t Open…

There are many, many problems which can lead to a drawing not opening.  Usually they are specific to one or two erratic objects in your drawing database that crash the AutoCAD engine when the file is loaded.  Even if you cannot even access your drawings, do not lose hope.  With a little time and effort, you can still extract (or find elsewhere) most or all of your uncorrupted data in many, many circumstances.

One important piece of advice:  do NOT press “Yes” when AutoCAD asks if you want to recover your drawing after you attempt to open it.  In the majority of cases, all you will do is save your errors to the master copy.  Instead, cancel out, immediately copy your file, and work on the duplicate.