Currupt Drawings
It is not uncommon to find that an AutoCAD or IntelliCAD drawing will not load (into the drawing editor). The software will usually report 'corrupt file' at some stage of the 'load'. The following discussion offers some suggestions for possible recovery of the drawing. IParts of it is adapted from From CADnews (Nov/Dec 1999) and the the prime credit must go to the original author.
The issue described here are covered in more depth in our CAD workshop series.
Possibility 1. The drawing opens but the software locks up
If you can open your drawing, but the software locks up shortly after and reports a corrupt file, try using the XREF command immediately the drawing loads and detaching all X-REFs.
It is a good idea to type the command directly at the keyboard rather than via a drop down menu or toolbar item. That is make the XREF and detach option the very first thing that you do!
This may be your only problem, your drawing may be trying to resolve what are known as circular X-REFs. This will sometimes happen if you have been sent a drawing file from another consultant who is collaborating with you on a project.
At the end of the XREF detach procedure, it is useful to use (& repeat several times) the AutoCAD PURGE command until its repetition finds no further unreferenced objects.
Note that if you have entities in papers pace, you will have to do the PURGE procedure twice, once in model space & once in paper space - then reassemble the drawing by inserting the cleaned model space & paper space entities into their respective spaces. Be aware that when you insert your paper space viewports back into paper space, the viewports will be off by default & must be turned back on.
Possibilty 2. The drawing opens but locks up when you start to draw
Try using the WBLOCK command to write out a fresh copy of the drawing. Load the new drawing and try it.
If that does not work, try using the DXF command to write out a DXF file from the drawing which will contain all drawing geometry. These files are text files and are unlikely to be corrupt. Then start a new drawing (from scratch) and use the DXFIN command to reconstitute the drawing.
Possibility 3. The drawing opens but locks up when you go to print
If you can open your drawing, but the software locks up when you try and print the drawing, first make sure that you are not sending the drawing to a 'phantom' printer i.e. one that is not available (like a network printer attached to a computer which is not turned on).
If that does not fix the problem, try using the WBLOCK command to write out a fresh copy of the drawing. Load the new drawing and try it.
If that does not work, try using the DXF command to write out a DXF file from the drawing which will contain all drawing geometry. These files are text files and are unlikely to be corrupt. Then start a new drawing (from scratch) and use the DXFIN command to reconstitute the drawing.
Possibility 4. Seriously corrupt files
The RECOVER command can be used to repair a damaged drawing. If AutoCAD or IntelliCAD determines that a drawing you're opening is damaged based on the drawing's header information, OPEN automatically repairs it.
It is well worth trying to use the RECOVER command on the troublesome file from the drawing editor of a brand new drawing. The RECOVER command (first made available in ACAD2000 and now a feature of IntelliCAD) is found via the file menu: Drawing Utilities Recover or (better in this circumstance) typed directly at the keyboard.
In the Recover Drawing File dialog box, enter the drawing file name or select the damaged drawing file. AutoCAD begins recovery and displays the results in the text window.
When FILEDIA is set to 0 (zero), RECOVER displays the following prompt on the command line.
Enter the name of drawing file to recover.
Enter ~ (tilde) at the prompt to ignore FILEDIA and display the Recover Drawing dialog box.
Use a .BAK file
If the RECOVER command cannot open the file, one must fall back on a backup. AutoCAD and IntelliCAD always produce a .BAK file whenever you save a file. It always has the .BAK extension with the same prefix as your corrupt drawing. You need to rename this file and give it a .DWG extension before you can work on it.
Note: The backup may have unnoticed corruption & should be run through the procedures set out below. I recommend the procedure below even if you load a (RENAMED BAK file) and the AutoCAD AUDIT command finds no errors.
In some cases a file which cannot be saved with the recover command can be saved by opening a new "START FROM SCRATCH" document and using INSERT to insert the corrupt file into a new one. Usually AutoCAD can recover a file and the procedure below should be followed. If you have used INSERT to recover your file that the RECOVER command could not repair, you should also proceed with the next step for assurance that the file has been cleaned to the maximum extents possible.
Note here that steps 2 & 3 can be reversed as to order. If possible start with this step & the DXFOUT command. Let's use the name house.dwg as an example. Create a DXF file (using the defaults in the command) from the bad file - the file name can be the same with the DXF extension (house.dxf). Now use the FILE/NEW command & assign a name that can be anything such as deleteme since we are not going to save the file. It is important to use no prototype. Now issue the DXFIN command & bring in the house.dxf file we just created. ZOOM EXTENTS & then ZOOM .9X so you can see everything.
Thaw, turn on, and unlock all layers. WBLOCK out this file. When you are asked what to block out, use a selection window. A selection window is better than typing "all" or using the "*" option because it will get rid of stray entities that you don't want as null text. The file name you create with WBLOCK could be house01. Now we can again use FILE/NEW with a no prototype environment - we should give this new file a name that reminds us it will be the new clean one - how about house02? When asked to save our deleted file, check NO. If you have objects in paper space, you will need to do a separate WBLOCK for those objects. If you were not able to DXFOUT in step 2 go back & do so now. Then you will be ready for the final step…..
This step is important even though you wouldn't think so. Our house01.dwg has been through both DXFOUT/IN & WBLOCK out, but let's do one last cleansing step. We are in an empty house02 file that was started from a null prototype. Use INSERT to insert our house01 into the present house02.dwg. When doing this insertion choose the option to explode house01 while you are in the INSERT dialog box. Also it's best to clear the check box for "SPECIFY PARAMETERS ON SCREEN" & let ACAD insert your house01 at point 0,0 or set the insertion point as desired. This house02.dwg is now as clean as it can get. At this point we can explode the house01 block we have just inserted & start to PURGE. When we finish purging, including purging out the house01 block, our current house02 is squeaky clean.
From CADnews (Nov/Dec 1999)
Recommendation:
Use AUDIT at the end of every drawing session.
Appendix
Designers working in disciplines such as architecture, landscape architecture and mapping are often on the receiving end of AutoCAD or IntelliCAD drawings that have passed through several hands before reaching them. Typically surveying firms, civil engineering firms etc have completed their own design work with very little thought given to the requirements of subsequent users of their drawing files. This process often causes problems for others working 'down the track'.
This set of notes is designed to provide some guidance on the handling of incoming drawings so that your own design work can proceed as smoothly as possible.
Print this page off and use the check boxes on each new job.
Run a virus check on the file
Do not rely on the sender making sure that the file is free from viruses. Run your own check. ![]()
Copy the drawing to a special folder
Once the drawing has been received (either by email or on disk) We recommend copying the drawing to a named folder. We typically call the folder 'Incoming' and save it as a folder under the job name.
Copy the drawing to your working directory (folder)
Now copy the drawing into your working folder. I like to rename the file at this stage and give the file a prefix using the date at which I start to modify the drawing. In the example below the drawing is now called 08_03_01 planting.
Now get a 'feel' for the 'foreign' drawing before you begin to work
In no particular order of importance, carry out the following:
-
Start AutoCAD or IntelliCAD. Open your 'renamed' drawing. Watch carefully as the drawing loads and jot down any error messages that appear. The most common message will involve missing fonts and missing external references. The F2 key can be used to 'pop up' the text window and you can carefully scroll back and sift through any error messages that appear. Both AutoCAD and IntelliCAD will substitute one of their own in-built fonts for a missing font, so you will not lose information. However, substituted fonts may 'bleed' into unwanted areas in the drawing and look very untidy. If fonts are missing, ask the originator of the drawing to send copies of the missing fonts and put them where AutoCAD and IntelliCAD can find them - on the search path.

-
Run the AUDIT command. Allow the program to automatically fix any errors that may be in the drawing.

-
Turn the UCSICON on. This helps in determining the 'space' that has been used for the drawing.

-
Switch to model space, zoom extents and use the VPOINT command with 1,1,1 and check to see if their is any 3D information in the drawing. Type PLAN to get back to the top view.

-
Watch the DVIEW option. Make sure that the UCSICON is on in model space. In the example below, the designer had used the DVIEW command to twist the view such that the main road was in the vertical plane (left panel). The DVIEW command is normally used to apply perspective, so this took a considerable amount of detective work to establish this.

|
|
-
Some designers send a copy of their 'pet' menu with their drawing. Make sure that the correct menu has been loaded. The MENULOAD command is useful here.

-
Zoom, Extents (to see the whole design) and then Zoom in on an object in the drawing of known size. Use the DISTance command to measure the object. This will enable you to asses the units that have been used to build the drawing. In the drawing below, I was able to determine that the designer was using meters as the base unit. The SCALE command was then used to scale the entire drawing by 1000 so that I could work in millimeters.
Check the layers being used, paying particular attention to any layers that may be frozen. Thaw (all) to reveal everything and then undo back to the 'as delivered' state. In this way you ensure that you know about all entities in the drawing and that the previous worker has not left an important layer frozen. The figure below shows that in our test drawing, a number of layers were indeed frozen. ![]()
Some versions of AutoCAD and IntelliCAD have tools variously called layer managers. Save the state of layers as you first open the drawing as 'as received'. You can then return to this state during the detective stage if required. ![]()
-
Create a series of layers for your new work. If for example, you were a landscape architect working to the US AIA standard, you might make a layer called L-PLNT-TREE for new trees, a layer L-PLNT-TXST for existing trees and so on.

-
Zoom extents and use the limits command.

-
Use the ID command to obtain the coordinates of a point in the drawing. the bottom left may not be 0,0 which you are used to. Set up the limits correctly so that your grid and snap will work properly.

-
Turn on the grid make sure that the designer has not used SNAP and rotate to alter the angle of the grid.

-
Use the BLOCK command with the ? option and get a list of blocks used in the drawing.

-
LIST several entities in order to determine the 'space' they have been drawn in - model space or paper space. It is highly likely that some blocks may need to be exploded. Watch out though for attributes store with blocks. Exploding a block will destroy the values contained in a block. Switch to paper space to check if entities have been drawn in paper space.

-
Use the PURGE command to remove any unwanted entities - layers, linetypes, blocks etc. The ALL option can be useful. Remember to save the drawing after this, then close it and reopen using the purge command again because a single purge does not get rid of all unwanted blocks.

-
Use the ATTDISP command to set ON. This ensures that all attributes stored in the drawing are displayed.

-
Use the VIEW command and apply the ? option to determine any views stored with the drawing. Similarly LINETYPE and ?, Dimension and ?, STYLE and ?, XREF and ?, Layer and ?

-
List several entities in the drawing of different colour determine if colour has been set BYLAYER or BYENTITY.

Now you are ready to create a new drawing. I recommend using the XREF command to attach this drawing (the one that we have examined in detail) as a base plan.
For more information on CAD training, click here.
