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.

 

 

 

System Save Options

Autodesk software incorporates two automatic save options to assist in file recovery.  One option creates files with a .bak extension.  It is an automatic feature that saves whenever your program terminates.  The other is an optional feature which allows you to save your files, with an extension you specify, to a backup location you specify, and at time intervals that you specify.

Open the BAK File

When you save a named drawing for the second time, AutoCAD creates a backup copy of the drawing using the .bak file extension, unless this feature has been disabled in the Options dialog box. Each time you use SAVE or use SAVEAS with the current drawing name, AutoCAD updates the backup file.

If your program terminates unexpectedly, AutoCAD tries to rename the current backup file to prevent it from replacing the previous backup file. AutoCAD uses the file extension .bk1 if that file name does not exist. If that file name does exist, AutoCAD generates new file extensions in the sequence .bk2 through .bk9 and .bka through .bkz.

You can revert to your backup version by renaming the .bak (or .bk*) file using the .dwg extension.  Before doing this, you will want to save your old file with and extension like .dwg_old, to avoid overwriting it.

Open the Time-Saved File

If you have set up your Options window to enable time saving of your files at a certain interval, you may try opening this version of your drawing.  Using Windows Explorer or the Windows Find feature, search the entire hard disk for SV$ files or BAK files with the same name as the drawing. Rename those files so that they have a DWG extension, and you may be able to open them.  Before doing this, you will want to save your corrupt file with and extension like .dwg_corrupt, to avoid overwriting it if it is in the same folder.

It is also a good idea to search your hard drive, and your network file server if you have one, for the name of your drawing.  It is possible that a recent version is available, left over from a move,  or automatically archived.

Fixing xRef Problems

External references (XRefs) are behind a large portion of problematic data.  Open all your XRefed drawings one-by-one.  If any of them display similar errors or won’t open, rename it so that your master drawing can no longer find it. 

Make sure all XRefed drawings are saved in the same version of AutoCAD as the main drawing is.  You can use the Batch Drawing Converter, which is available free, from the Autodesk website, to convert all your drawings to the correct version.

The problem can also reside in the links between the XRef and your drawing.  Try renaming all of your xRefs, to remove any linking issues from consideration.  Once your xRefs are out of the picture, you can try opening, recovering, or other steps only on your master drawing.

Recovering or Recreating Your File

The Recover Command

The AutoCAD Recover command is a powerful tool to find errors in your drawing.  It actually uses the same process as the Audit command, except Recover can be run with the drawing closed.  The command performs an error audit on your drawing database, and either fixes or discards the problems it finds, depending on severity.  It doesn’t always work, and when it does it tends to change parts of your drawing, dissociate objects from their styles, or erase objects.  However, if your file has been backed up, it is good to use it as a beginning first step.

o        Start a new drawing in AutoCAD.

o        Go to File>>Drawing Utilities>>Recover, or type RECOVER into the command line.

o        In the Select File dialog box, select the damaged drawing file. AutoCAD begins recovery and displays the results in a text window.  You may be prompted to continue at certain points during the process, so you’ll have to watch the display.

Use Insert to Recreate Your Drawing

The Insert command allows you to insert blocks or entire drawings into a new drawing.  It is similar to the wBlock command, but doesn’t require a drawing to be open to create and insert a block from it.

o        Start a new drawing in AutoCAD.

o        Type INSERT into the command line.  This will bring up the Insert dialog box.

o        Specify a point other than the origin for the insertion point.  You can move it back later, but this can prevent some problems.

o        Press OK.  Your drawing should be redrawn in the new file.  If so, run an Audit on and Purge the drawing and save it.

o        If this did not work, try the command again.  This time, check the Explode box in the lower left corner of the Insert dialog box.

The Query Function in Autodesk Map

If you do not own at least one version of Autodesk Map, we recommend you purchase one for your office.  Even if you do not even touch a map for any of your projects, Map’s query functionality can completely change the way you organize work, and it can eliminate conflicts where several drafters need to modify the same file.  It will save you countless hours of dealing with xRefs, inserting blocks, and manipulating data.  It can also be the last but best line of defense when data is lost.

Map is a module built upon basic AutoCAD.  This means it shares all AutoCAD’s functionality and user interface.  In addition to several powerful geographical information tools, it includes a more general database query tool.  Since AutoCAD is an information-rich database at its core, the query function is very powerful.  A user can query information into a drawing from another drawing’s database without opening the source drawing at all.  The query function is unobtrusive, it merely reads and replicates the source data into a new file. 

In addition, and importantly for recovery purposes, the user can specify several criteria for which types of data to bring in.  For instance, one can specify a query in only objects on a certain layer, or of a certain color, or only certain named blocks.  Some limitations are that OLE Objects are not recognized in the query, and xRefs will only show as names, and must be attached separately.  The query functionality is also included in Land Desktop.

Follow the instructions below to use the Map query function to read and rewrite the data in your file.

o        Start a new drawing in Autodesk Map.

o        From the Map menu, choose Utilities>>Project Workspace.

o        From the Project Workspace, right-click Drawings and choose Attach from the shortcut menu.  This will open the Select Drawings to Attach  dialog box.

o        Navigate to the folder containing your corrupt drawing.  Select the drawing and choose Add.  Choose OK to close the Select Drawings to Attach dialog box.  Your drawing should now be listed below the Drawings item in the project tree in the Project Workspace.

o        Following the next several steps, create a query and run it on the corrupt drawing.  From the Project Workspace, under Query Library, right-click Current Query and choose Define from the shortcut menu to open the Define Query dialog box.

o        In the Query type area, choose Property to open the Property Condition dialog box.

o        In the Select Property area, select the Layer option.

o        Select the equal operator (=) from the Operator list.

o        Type an asterisk ( * ) in the Value field, and then choose OK to return to the Define Query dialog box.

o        In the Query mode section of the Define Query dialog box, select Draw.

o        Click Execute Query.

This should recover the information into your new file.  You can view it by zooming to the extents of your drawing.  Save this file, and you should be able to open it in basic AutoCAD.  If this doesn’t work, you will have to refine your query.  The objective in this process should be to recover as much uncorrupted data as possible by narrowing your query to exclude only corrupted data.

o        In the Define Query dialog box, choose Property… in the Query type section.  This brings up the Property Condition dialog box.

o        In the Property Condition dialog box, you can refine your search by specifying layers, blocks, and several other criteria to bring into your drawing.  Try querying layers one by one.  The corrupt data probably exists on one or two of them.

o        Once you have narrowed it down to one layer you can select another property to query.  For instance, you can query the corrupt layer block by block, or section by section with an area query, to get most of the information from it.

Partial Open

If you do not own Autodesk Map, there is another tool called Partial Open that will allow you to open only certain parts of the drawing database, albeit without nearly as much precision as the Map query affords.  Please note, it is also only useful if you have saved model space views of your drawing.  Also, it will not work with any drawings created in pre-2000 versions.

Follow the instructions below to open parts of your drawing, then follow the steps above for drawings that will open.

o        Open AutoCAD with a blank drawing.

o        From the File menu, choose Open.

o        In the Select File dialog box, select the corrupted drawing.

o        Click the arrow next to Open and choose Partial Open.

o        In the Partial Open dialog box, select a view; the default view is EXTENTS.

o        You can load only geometry from model space views that are saved in the current drawing.

o        Select one or more layers.  If you do not select a layer or layers to load, no layer geometry is loaded into the drawing but all drawing layers exist in the drawing.  If no layer geometry is specified to load into the drawing, no geometry is loaded even if the geometry from a view is specified to load.  If you draw objects on a layer that is not loaded, you may be drawing on top of existing geometry that is not loaded in the drawing.   Xref-dependent layers are displayed in the Layer Geometry to Load list only if the selected drawing was last saved with the VISRETAIN system variable set to 1. Any layers created in the xref since the xref was loaded into the drawing are not displayed in the Layer Geometry to Load list.

o        If the drawing contains a spatial index, you can select the Use Spatial Index option.  A spatial index is a list that organizes objects based on their location in space.  AutoCAD uses a spatial index to locate the portion of the drawing that is read; this minimizes the time required to open the drawing.

o        If the drawing contains xrefs but you don't want to load them, select Unload All Xrefs on Open.

o        Choose Open.

o        You can choose to load additional information into the current drawing as long as the drawing is partially open.

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

Of all the truths you deal with regarding your computer software, perhaps the most universal is that even the most well-constructed programs will fail at some point.  Many times it is not even a problem with the software.  In a system as complex and fast as a modern computer, probability dictates that programs will interrupt other programs at inopportune moments, hard drive sectors will be corrupted, power surges will happen, and 1’s will change to 0’s despite all the well-meaning of error-checking software and careful state saves.

Much like the other complex systems in your life – your car, your family, your finances – planning and prevention is key to being ready at the moment the problem manifests itself with a smile on your face and a solution at hand.

This section will skim over some of the more useful recommendations.  CVIS has many more in-depth articles relating to keeping your networks, computers, and software in smooth running order. You can find these by emailing dkohr@cvis.com or calling 1-800-511-8020 and asking about our Technical Documents.

The best tool we offer for prevention of lost time, data, and productivity is the CVIS CAD Manager Boot Camp, held twice annually. 

Save.  Save Again.  And Save One More Time.

It goes without saying that the first line of defense against problems is to save your work.  However, there are ways to do this more intelligently that can save time, too.  The first step is to save regularly.  Every time you make a major change, habitually make a quick trip to the save icon to store it.

In addition, your project team should have established landmarks for archiving files.  Save daily versions for the current project segment, then permanently archive at each major milestone.  Backup your server regularly with a tape backup, and keep a copy of the tape off-site.  

An important note:  do NOT say yes if AutoCAD asks whether you would like to try to recover a damaged file on opening.  With this method, you are likely to save the error permanently to the original file, the backup, and maybe the time-saved version.  Simply cancel out, copy your file, and perform all operations on the copy.

Automatic Save Options in AutoCAD

AutoCAD offers two options for automatically saving your files.  Both are accessible in the Open and Save tab of the Options box.  This can be accessed by right-clicking in the command window, or through the Tools menu.

When you save a named drawing for the second time, AutoCAD creates a backup copy of the drawing using the .bak file extension, unless this feature has been disabled in the Options dialog box. Each time you use SAVE or use SAVEAS with the current drawing name, AutoCAD updates the backup file.

If your program terminates unexpectedly, AutoCAD tries to rename the current backup file to prevent it from replacing the previous backup file. AutoCAD uses the file extension .bk1 if that file name does not exist. If that file name does exist, AutoCAD generates new file extensions in the sequence .bk2 through .bk9 and .bka through .bkz.

Be sure that “Create backup copy with each save” is checked in the Options menu.  You can revert to your backup version by renaming the .bak (or .bk*) file using the .dwg extension.  Before doing this, you will want to save your old file with an extension like .dwg_old, to avoid overwriting it.

AutoCAD also offers a time-dependent save mechanism.  This option is more flexible than the BAK option.  You can specify the file extension the system should use for these files and the time increment for saves in the Open and Save tab of the Options box, and you can specify the path for time-saved drawings in the Files tab.

 

The amount of time between saves should take into account a couple of factors.  On the one hand, you do not want to lose much of your work, so the increment should be small.  On the other hand, you do not want your time-saved file to save the errors that caused your crash in the first place, so the increment should be large enough to reduce the chances of that happening.  The exact number is a value judgment best left to you.

Your System – Take Care of It!

Believe it or not, much lost data is not the result of AutoCAD making a mistake.  While AutoCAD may be the star on your computer, every star needs a good supporting cast.  Keeping your system well-tended and clean is a very important part of keeping your files in working order.

This is just a summary.  CVIS also offers a much more comprehensive set of documents on keeping your system up to date and clean as a whistle.  Email dkohr@cvis.com to purchase it.

The Quarterback:  Hardware

Your system’s hardware is just as important as the software on your computer.  Invest in a decent hard drive – we suggest a newly formatted one for each install if at all possible.  The processor speed, memory amount, and video card are also very important.  This is not only for performance, but also to keep the processor load to reasonable levels.  A processor that is under a heavy load will have to do a trade off between running different processes and do so more often to keep everyone happy.  Plenty of RAM will prevent freeze-ups that can corrupt data files, and will lessen the amount of transfer and rewriting on the hard drive, (which is a major place where errors creep in).  A good video card will make everything run smoother, because CPU processors and memory aren’t optimized for display applications.

How much is enough?  Do not go by the minimum requirements on the box!  They are just that:  minimal.  They will allow you to start AutoCAD and draw simple objects with nothing else running, but anything beyond that will tax whatever the relevant bottleneck is.  Your computer will freeze and crash more often, and the amount of time you spend waiting and control-alt-deleting will more than make up for the money you thought you saved on your computer.  A rule of thumb is to take whatever’s on the box, and go up to the next best thing.  Half a gigahertz of processor speed, an extra 256 MB of RAM, and the next Video Card up will make a huge difference in performance.

The Coach:  Operating System

The line on operating systems for AutoCAD 2000 and above is simple and unwavering:  use Windows 2000 Pro or Windows XP Pro, and keep them current with Windows Updates.  Operating systems carry all the information from the machine level to your eyes.  Everything that goes in and out of your computer is handled by it.  If you think you’ll save money by going with the home version, or save time by staying with familiar Windows 98 or ME, you are wrong.  You will just spend more time and money fixing crashes, recovering files, rebooting your system, etc.

The Defensive Line:  File Management

A new computer always seems to work so well.  It is quick to respond, relatively error-free, able to run for days without a sinister error box popping up.  Then, you start noticing problems.  Performance starts to decline.  Your programs crash out regularly.  Windows take forever to render.  Popups pop up.  What is happening, and how can you prevent it?

 

Basically, you’re not keeping tidy.  You must keep your computer clean.  Keep your virus protection updated, and run it once a week (but turn it off while you’re working, it can slow you down).  Defragment your hard drive as often as possible.  Get the Google toolbar, an effective way to block popups.  And most importantly, remember that nothing is free:  most of the programs you download for a smile from the web are spyware.  They seem innocuous enough, but they slowly burrow into your system registry and mine information about you, crash your programs, and slow down your computer.  Get spyware detection software such as Spy-bot or Ad-Aware and get rid of the problems.  These basic steps will keep your machine running optimally much longer.

Your Files – Protect Them!

Your data, as you have probably realized at this point, are like children – very precious, and very fragile.  And when they’re gone, you’ll wish you had spent more time with them.  There are some guidelines you should consider when setting up your projects:

o        Never Work on Master Copies:  Keep a set of master drawings that only administrators can change.  When work needs to be done on a drawing, copy it, wBlock it, or use a Map query to recreate it.  Have one person administer the master drawings, to keep them current and uniform.  Make your common libraries read-only, too, to prevent unwanted changes to xRefs and common blocks.

o        Audit, Purge, wBlock, and Repeat:  These three commands should become your best friends.  Perform Audits and Purges every time you go out to lunch or leave the office.  wBlock your files to new files regularly, so that the database is rewritten from scratch.

o        Be Consistent:  Have everyone in your office switch to new versions of the software at the same time.  Do it on Saturday when they can’t put up a fight.  Uninstall the old versions while you’re at it.  One of the biggest time eaters in business today are file format conversions.

o        Plan Conversions:  You know there will be new versions of the software, and you know when.  Plan accordingly.  Autodesk has a good PDF for migrating files between versions called Best Practices for AutoCAD Migration.  CVIS suggests installing the program on one or two computers before the full conversion, to find any problems before they become critical, and to ensure that someone in the office has had a look at the new features and interface.  It is often a good idea to wait until the first service pack is released to deploy to the entire office.

o        Consider Map:  Autodesk Map is more than GIS software, it is “AutoCAD on Steroids.”  The query tool is a very powerful way of sharing data among several people, and all without touching the original!  Seriously consider purchasing the software and some basic training for it.

o        Careful with those XRefs:  One of the biggest sources of error in AutoCAD drawings is xRefs.  Learn about them, how they work, their limitations, and the alternatives to using them.  CVIS covers xRefs extensively in our AutoCAD Level 1 Training.  We also cover the best ways to get around using them in our CAD Pilot Jump Schools.

Your Resources – Use Them!

There are many resources available to you that can prevent problems with your programs and data.  Use and keep up to date on them.

o        Take Out the Trash:  If you successfully recover from an error in a file, it is a good idea to recreate the file from scratch using WBLOCK, Design Center, Display Manager, and Style Manager to bring over your data.  It will take a fair amount of time, but it is best not to mess around with damaged goods, even if they say they’re fixed.  Heed the warning signs.  This is also something you may consider doing at milestones in your project.  It may not save you net time in the long run, but planned downtime is better than unplanned downtime.

o        Error Reporting:  If AutoCAD encounters a problem and closes unexpectedly you can send an error report to help Autodesk diagnose problems with the software. The error report includes information about the state of your system at the time the error occurred, and you can add other information, such as what you were doing at the time of the error.  However comprehensive the development effort, testing cannot possibly mimic all real-world situations.  Sending these error reports can prompt bug fixes, patches, or at least warnings about risky procedures.

o        Service Packs:  Autodesk periodically releases service packs for most of its products.  These address common grievances, bugs, and inconsistencies.  They often also include additional features.  Go to AutoDesk’s website and download the latest service packs for your software.

o        Training:  The best way to recover lost data and prevent it in the first place is to understand how the software works.  AutoCAD does not create drawings anymore; it creates databases and interprets them on-screen as drawings.  The better you understand how it does this, the better prepared, creative, and confident you will be in the event of catastrophe.  CVIS offers CAD Pilot Jump School, an intensive training class focused on the data-driven nature of AutoCAD, and how best to use it.

 

 

About the Authors
Portions of this document were produced and edited by multiple members of CVIS Technical Services staff without whose knowledge and expertise this document would be impossible to produce.
Special recognition to the Clients of CVIS and their staffs who aided in the validation and review of the contents.

Contact Us  support@cvis.com            Visit Us  cvis.com
Phone 1-800-511-8020     Fax 1-800-511-8021     4630 West Jacquelyn Suite #108  Fresno, CA 93722
©2004 Central Visual Information Systems, Inc.  Reproduction of this document is prohibited.
Late updated on 9/3/2004 4:27 PM