Errors in AutoCAD drawings

AutoCAD is a vector based drawing program. It keeps a database describing the properties of every element placed in the drawing by the drafter. The screen representation in the drawing editor is just that - a representation of what is in the database.

 

Corruption of drawings

From time to time the drawing database can become corrupt and a drawing will start behaving badly. This may be due to a number of reasons: 

 

Duplicate elements in the database,

Exploded hatching can sometimes give problems,

Phantom elements such as hatching.

 

You may get messages such as "Unable to continue - autosave?". This may be an indication that the drawing database has become unstable. 

 

Auditing a drawing

Recognising this, Autodesk (from about Release 12 onwards) provided an AUDIT function (command). This command should be used from time to time to check the integrity of the drawing database. 

 

Early versions of AutoCAD LT did not implement the AUDIT command, but AutoCAD 2000 certainly does.

The audit command

The AUDIT command is a diagnostic tool for examining the current drawing and correcting errors. For every error detected, AutoCAD provides a description and recommends corrective action.

 

For easy access, AUDIT places all objects for which it reports errors in the 'Previous' selection set. A quick issue of the MOVE command with the P option chosen, will show just those those entities that have been adjusted by the use of the audit command. 

 

Note that editing/audit commands affect only the objects belonging to the current paper space or model space. You need to audit in both paper space and model space.

 

Audit log

When the AUDITCTL system variable is on, AUDIT creates an ASCII file containing a description of the problems and the actions taken. 

 

This report file is placed in the same directory as the current drawing and given the file extension .adt. If you want to open this file, use Windows NotePad.

 

If a drawing contains errors that AUDIT can't fix, the RECOVER command can be used to retrieve the drawing and correct its errors.

 

Audit and external references

Be especially careful with drawings that have external references attached. Using the Audit command may fix problems in the current drawing session, but when the drawing is saved and reloaded, those very same errors will appear again because they are buried in the XREF(s). This can be very frustrating indeed.

 

Error reports

It is a good idea to 'flip' to the text window when you are having problems with a drawing. Errors in the drawing display in the text window (F2 in Windows, F1 in DOS). 

 

Handle errors

Every entity in an AutoCAD drawing is assigned a 'handle'. If any of the errors are handle or 'handseed' errors, you can fix the handles. If the drawing is used over and over, the number of handles can exceed the maximum number allowed and cause problems. You can test to see if the drawing is near or has exceeded the number of handles allowed. If you have found possible handle errors using either the AutoCAD audit or this test, then after you wblock the drawing, you should fix the 'handseed' errors.

 

To test for handle errors:

 

Place a primitive element such as a circle in the drawing.

 

At the Command prompt, type the LIST command, and press ENTER.

 

Select the circle and press ENTER twice. 

 

The properties of the circle display in the text window. If there is a Handle= number in the list, count the number of characters in that number. If the number is 15 or 16 characters long, you may have handle problems. 

 

Erase the circle.

 

Wblocking drawings

One method to clean up problem drawings that auditing does not fix, is to use the WBLOCK to create a new drawing from the problem one. Then insert that drawing into a freshly created blank drawing file. 

 

If your drawing uses paper space, you must wblock the paper space objects separately. 

 

Cleaning tiled model space drawings

To clean a drawing that does not use paper space:

 

Open the drawing

 

At the Command prompt, type wblock, and press ENTER.

 

In the Create Drawing File dialog box, under File Name, type a new drawing name, and click OK. (Remember which directory the drawing is going into.) 

 

At the Block Name prompt, type *, and press ENTER. All objects in your drawing are exported to the new drawing.

 

Create a new drawing.

 

At the Command prompt, type ddinsert, and press ENTER.

In the Insert dialog box, click File.

 

In the Select Drawing File dialog box, under File Name type the drawing name you just created, and click OK.

 

In the Insert dialog box, select the Explode box, and click OK.

 

At the Insert point prompt, type 0,0, and press ENTER three times. 

 

The objects are imported into the current drawing.

 

Drawings with paper space

To wblock the model space objects:

 

Open the drawing.

 

At the Command prompt, type tilemode 1, and press ENTER.

 

At the Command prompt, type wblock, and press ENTER.

 

In the Create Drawing File dialog box, under File Name, type model, and click OK.

 

At the Block Name prompt, type *, and press ENTER. The objects in model space are exported to the new drawing.

 

To wblock the paper space objects:

 

At the Command prompt, type tilemode 0, and press ENTER.

 

If the drawing is not in paper space, type pspace, and press ENTER.

 

At the Command prompt, type wblock, and press ENTER.

 

In the Create Drawing File dialog box, under File Name, type paper, and click OK.

 

At the Block Name prompt, press ENTER.

 

At the Insertion Point prompt, type 0,0, and press ENTER.

 

At the Select Objects prompt, select all the objects in paper space, and press ENTER.

 

To recompile the drawing:

Now start a new drawing, switch to tiled model space and bring in the model space entities, switch to paper space and bring in the paper space entities.

 

Create a new drawing from the File menu, and click New.

 

In the Save Changes to . . . query box, click No.

 

At the Command prompt, type ddinsert, and press ENTER.

In the Insert dialog box, click File.

 

In the Select Drawing file dialog box, under File Name, type model, and click OK.

 

In the Insert dialog box, select the Explode box, and click OK.

 

At the Insert point prompt, type 0,0 and press ENTER three times.

 

Get into paper space: at the Command prompt, type tilemode 0, and press ENTER.

 

At the Command prompt, type ddinsert , and press ENTER.

In the Select Drawing file dialog box, under File Name, type paper , and click OK.

 

In the Insert dialog box, select the Explode box, and click OK.

 

At the Insert point prompt, type 0,0 and press ENTER three times.

At the Command prompt, type mview , and press ENTER.

 

At the ON/OFF/Hideplot/&ldots;/<First point> prompt, type on, and select the viewports in paper space.

 

At the Command prompt, type regenall to regenerate all the viewports.

 

Recommendation:

Use AUDIT at the end of every drawing session. Do not continue working with drawings that fail the audit test.