Note that most of the recovery
methods explained in this document can be used in all releases of
AutoCAD® and AutoCAD LT® software.
Recovering a Drawing
Autodesk Product Support
strongly recommends that you perform the following steps before
recovering a corrupted drawing:
- Make a copy or copies
of your drawing on reliable storage media. For example, if
you suspect that your hard disk contains bad sectors, copy your files
to another hard disk, a network drive, a floppy disk, or a tape. It is
best to perform recovery operations on a copy of the file, since there
are several different methods of recovery, and each method alters the
file in a different way. For each recovery method, it is best to use a
copy of the original file since recovery processes may alter a damaged
drawing yet still not recover it enough that AutoCAD can open it. If
you retain a copy of the original damaged file, you can then use
another recovery process on the original file.
- Identify and make backup
copies of BAK files associated with the damaged drawing. If you open
and save a damaged file without fully recovering it, you may overwrite
a good BAK file with a corrupted BAK file.
- Note that there is a
mechanism in AutoCAD that prevents a good BAK file from being
over-written by a corrupted BAK file. When AutoCAD saves a drawing, it
also checks the file for corruption. If the file is corrupted, AutoCAD
does not overwrite the existing BAK file. Instead, it creates backup
files that have the file extension(s) .bk1,
etc. Be aware that this process is not always successful; therefore, it
is a good idea to make archive copies of good BAK files if you suspect
that you have a corrupted file.
- Try to identify the source
of the corruption. For example, if you suspect that drawings are
becoming corrupted by copying files onto a hard disk with bad sectors,
you should identify and correct the problem with the hard disk before
you begin to recover your files. By doing some investigation, you may
find that there is more than one source that is causing the corruption
or that your original assumption about what is causing the problem is
- Record any error messages
generated by AutoCAD or the operating system. Note when the messages
occur in order to find a connection between the messages and when the
drawing becomes corrupted. Continue to record any errors or messages
that are generated during the recovery process.
To use the RECOVER command on a
damaged drawing, launch AutoCAD and open a new drawing with no
prototype. Use the OPEN command to open the drawing. If AutoCAD detects
that it is corrupted, a message is displayed indicating the file is
damaged. AutoCAD then prompts you to use the RECOVER command to open
the drawing, and a message is displayed asking you to enter YES to
proceed. If you proceed, AutoCAD then scans through the drawing
database to detect and fix errors. If the RECOVER process repairs the
file so that it can be opened, AutoCAD then opens the drawing and a
message similar to the following message is displayed on the command
Drawing recovery log.
Validating objects in the handle table.
Valid objects 10033 Invalid objects 0
Validating objects completed.
Used contingency data.
Salvaged database from drawing.
0 Blocks audited
Pass 1 10000 objects audited
Pass 2 10000 objects audited
Pass 3 10000 objects audited
Total errors found 720 fixed 720
If the the drawing cannot be
repaired, one of several messages is displayed to indicate that the
file cannot be recovered. If the drawing is severely corrupted, the
recovery process may lock up or AutoCAD may shut down. If this happens,
you need to reboot the computer and try a different recovery method.
If the drawing can be opened
with the RECOVER command, you should next use the AUDIT command. It is
possible to have a drawing that contains "nested" damage that cannot be
fixed by the RECOVER process on the first pass. In this situation, use
the AUDIT process once or several times to fix this type of damage.
To begin, enter audit
on the command line. You will be asked if you want the AUDIT process to
attempt to fix any errors it encounters. Press the Y key to accept this
choice and begin the AUDIT process. AutoCAD will now scan through the
existing open drawing and attempt to find and fix errors. A report
similar to the following report will be displayed on the command line
(press F2 when the audit is complete to view the entire report):
any errors detected? <N>
0 Blocks audited
Pass 1 10000 objects audited
Pass 2 10000 objects audited
Pass 3 10000 objects audited
Total errors found 16 fixed 16
If AUDIT finds and fixes
errors, you should run the process again until no more errors are found.
Be aware that AUDIT may find
errors that it cannot fix. Also, the audit process will sometimes
report that it has found and fixed errors in the drawing, but
subsequent audits will report finding and fixing the same number of
errors. If this occurs, try to run the RECOVER process again or try one
of the other recovery methods described in this solution.
the INSERT Command to Recover Drawings
It is sometimes possible to use
the INSERT command to recover a damaged drawing. If the RECOVER command
cannot successfully open a drawing, you may be able to insert the
drawing into another drawing as if it is an external block.
To use the INSERT command:
- Start AutoCAD and open a new
drawing. Be sure that you do not
open a prototype drawing.
- Enter ddinsert
on the command line. (You can also click Draw > Insert >
- In the Insert dialog box,
click File, and then select the damaged drawing in the Select Drawing
File dialog box.
- Clear the Specify Parameters
Onscreen check box, and select the Explode check box.
- Click OK in the Insert
AutoCAD attempts to insert and
explode the damaged drawing. If the process succeeds, run the AUDIT
command as described in the preceding section.
Command for Saving Parts of a Drawing
If you have a drawing that can
be opened but AUDIT cannot fix, use the WBLOCK command to extract
entities from the damaged file. This method is also good to use on
drawings that become corrupted again even though the RECOVER feature
To use the WBLOCK command:
- Start AutoCAD and open the
- Set all of the layers in the
drawing to ON, THAWED, and UNLOCKED.
- Enter wblock
on the command line to create a new external block.
- In the Create Drawing File
dialog box, enter a name for the block.
- Enter a name for the
internal block (or press ENTER), and then select an insertion point.
- Select all the objects in
the drawing by entering all
on the command line or by manually selecting all of the objects using a
- Close the current drawing
after the external block is created without saving the changes and open
the external block file.
- Run the AUDIT command on
this drawing to test the file for corruption.
If running AUDIT on this
drawing reports it finds errors, discard this file and reopen the
original damaged file. The following discusses two methods for how to
proceed. The first method should be used for a drawing that contains
less than 30 layers; the second method should be used for a drawing
that contains more than 30 layers.
#1 - For drawings with less than 30 layers
- Freeze all the layers in the
drawing except for the first layer in the layer list and create an
external block from the data on this layer.
- Open the external block file
as described in the preceding section and perform an AUDIT.
- If AUDIT reports errors,
discard this drawing, reopen the damaged file, and create an external
block that contains only the data on the second layer in the layer
- Repeat this process until
you have determined which layers in the damaged file contain corrupted
- Use WBLOCK to create an
external block that contains all the objects on layers that do not
contain corrupted data.
#2 - For drawings with more than 30 layers
- Set all of the layers in the
drawing file to ON, THAWED, and UNLOCKED.
- Zoom to the drawing extents.
- Use the WBLOCK command to
create an external block from all the objects in the upper right
quarter of the screen area.
- Repeat this process for the
other three quarters of the drawing.
- Open each quadrant drawing
separately and run the AUDIT process on each.
One or more of the quadrants will fail the AUDIT process.
- Divide these quadrants into
quarters and repeat this process until you have identified all or many
of the quadrants that do not report errors when audited.
These quadrants can then be reassembled into a single drawing.
Recovery using DXFOUT and DXFIN
AutoCAD contains a translator
for creating drawing interchange format (DXF™) files from DWG
files. It is possible to use the DXF conversion process to fix damaged
drawings. However, the DXF translator was not designed for recovering
drawings, therefore this process will not work on drawings that contain
a lot of damaged data. Also, the error and warning messages that are
displayed during the DXF translation are not meant to provide detailed
information about the status of drawing damage or recovery.
To use the DXF translator to
recover a file, you need to open the drawing in AutoCAD and then
immediately cancel the first automatic regeneration process that occurs
when the drawing is opened. If you can perform this step, you can use
the DXF translator to create a DXF file. You can then either
re-translate the DXF file into a DWG file or repair the DXF file
manually by editing it in an ASCII text editor, such as
- Start AutoCAD.
- On the File menu, click Open.
You can also enter open
on the command line.
- Select the damaged drawing
from the File dialog box to open it.
- In the Select File dialog
box, click OK to open the drawing and immediately press the ESC key to
cancel the current command. (If you are using MS-DOS® AutoCAD
or if you have configured Windows AutoCAD as "Classic AutoCAD," you
must press CTRL+C).
This process should cancel the
first regeneration of the drawing. If the drawing can be opened, the
AutoCAD command prompt will appear. (You may want to practice this
process with an undamaged file to get a sense of how to do this.)
Next, enter dxfout
on the command line. You are then prompted to enter a name for the DXF
file and to specify the level of accuracy for the file translation. The
translation process begins when the level of accuracy is entered. Refer
to the AutoCAD User's Guide
for more information about DXF files and translation choices.
After the DXF file is created,
re-import the file into AutoCAD using the DXFIN command. To import the
file into AutoCAD, open a new drawing (no prototype) and enter the dxfin
on the command line and select the DXF file you created. The file is
then translated again into an AutoCAD DWG file.
If the DXFIN process fails, you
can view and edit the DXF file in an ASCII text editor. A DXF file is a
complete translation of the drawing into ASCII text. Refer to the AutoCAD
Customization Guide for a
description of the contents and structure of a DXF file. If you prefer
not to learn the structure of DXF files, you can scan the file for
obvious anomalies or corruption, or possibly truncate or remove
sections of the file in order to salvage some data.
of Drawing File Corruption
As previously noted, file
corruption can occur for a number of reasons. If you discover that you
have a damaged drawing, it is important to track down and eliminate the
source of corruption to prevent the problem from recurring. This
section describes some of the most common reasons and recommends
drawing can become corrupted because it is copied to a floppy disk or
hard disk that contains defective sectors. Also, a drawing on a floppy
disk or hard disk can become corrupted because the disk is damaged due
to a power surge or other type of physical damage.
Use the tools provided with the
operating system, such as Scandisk (provided with Windows® and
MS-DOS), to detect flaws in the physical media. Also, third-party
diagnostic applications, such as Norton Utilities, can detect, and in
some cases, prevent future access to damaged sectors on physical media.
Suggested drawing recovery
procedures include the steps listed above. Also, files can sometimes be
recovered from damaged physical media by computer hardware service
A drawing can become corrupted
because the system RAM is defective. When the drawing is edited in
AutoCAD, the file is copied into and out of RAM and is not correctly
written back to the hard disk.
This problem usually manifests
itself in other areas, such as corrupted operating system files or
failure to run AutoCAD and other programs, before you experience
corrupted AutoCAD drawings. If you encounter any of the following
problems, you should check the integrity of the system RAM:
- Drawings become corrupted
- System terminates
- Error messages occur in
AutoCAD and other programs
Several third-party diagnostic
applications, such as Norton Utilities, can detect flaws in system RAM.
A drawing can sometimes become
corrupted if an AutoCAD session is terminated while the drawing is open
Drawings are not easily
corrupted while they are open in an AutoCAD. When a drawing is open and
changes are made, the new or edited data is stored in temporary files.
When a SAVE is performed, the information in the temporary files is
written to the drawing database. If an AutoCAD session is terminated
between saves, the data in the temporary files is lost, therefore, the
drawing will not contain any of the changes from the current editing
session. However, if an AutoCAD session shuts down unexpectedly during
a SAVE operation, it is sometimes possible for the open file to become
If AutoCAD shuts down
unexpectedly, it is usually because of memory conflicts with other
applications on a system, or a lack of system resources. If your
installation of AutoCAD shuts down unexpectedly (even if drawings do
not become corrupted), you should diagnose the problem by eliminating
the possibility of a memory conflict or a shortage of system resources.
Drawings or DXF files from
other CAD applications will not open in AutoCAD because of file
Files from other CAD
applications will sometimes generate error messages when you open them
in AutoCAD. In most cases, the application that created the file has
not created the DWG or DXF file correctly. You should confirm the file
is not actually corrupted by opening it in the original application and
running the equivalent of the RECOVER command in that application.
In some cases a DWG or a DXF
file created by another CAD package is meant to be used only with a
specific release of AutoCAD. For example, a CAD application might only
produce DXF files that can be opened in AutoCAD Release 12 and not
Release 13. The documentation for the application that produced the
file will generally provide information about compatibility with the
various releases of AutoCAD.