Knowledgebase
Drawing Saved with Errors
Posted by James Johnston on 22 July 2015 10:32 AM

Update: With the upgrade to IntelliCAD 7, MicroSurvey CAD 2013 and MapScenes 2013 and newer users rarely encounter this issue.  If this is a common issue please ensure that you are running the latest software from MicroSurvey.

When IntelliCAD detects an error in a drawing during the save operation it will notify you that the drawing has been "Saved with Errors."  The program will rename the file as "<Drawing Name>_SavedwithErrors.dwg.

MicroSurvey CAD or MapScenes does not rename the .msz file when this happens, so if you open the "Saved with Errors" file you will find all your survey data appears to be missing.  It is not missing, please follow the guide below for steps to getting your project back on track.

When you see the "Saved with Errors" message you must deal with the problem right away.  In the past users did not have this feature and would continue to work with their corrupted drawings until a crash or error made the drawing unusable, and hours of work could be lost.

Before you begin trying to find the cause, we recommend that you make a copy of your most recent error-free dwg, msz and (if it exists) rtf files in a separate directory.  Close MicroSurvey and use Windows Explorer to accomplish this task.

**Note: If you are unable to view the three letter extensions of some of your files you may need to configure your Windows Systm to allow their display.  Pick on this link if you have Windows XP, this link if you have Windows 7 or Vista for a guide.

Below is a series of steps to follow if you see the "Saved with Errors" alert:

1. Drawing File Audit

-Type "audit" in the command line.  The first time through type "N" to the prompt to repair any errors found just to see the result.  You may see a result as below:

Fix any errors detected? [Yes/No] <N>:
157391 objects audited   C:\Users\james johnston\Documents\MicroSurvey\MSCAD\2010\Customer Files\Test\Test_SavedWithErrors.dwg   Fri Aug 06 11:11:48 2010
Total errors found during audit 0, fixed 0

-If there are no errors carry on to step 2. 

-If there are errors, repeat the audit command but type "Y" to the prompt to repair the errors.  If the repair is successful you MUST save the drawing, close and reopen the program and reopen the "_Saved with Errors" version of the drawing.  Test the drawing by running the audit again. 

If it is free of errors proceed to the FINAL step below:
If not, please continue:

2. The Error Log

When a drawing is saved with errors an error log is created in the same folder as <Drawing name>_SavedwithErrors.dwg.  It will be named <Drawing Name>_SaveErrors.log and can be opened using Windows Notepad.

-The contents of the log may help us to narrow down which specific entities can be deleted to clear up the errors. 


An example of a listing from an error log is below:

 
3973 | prj\lib\DRW\DWGdirectWriter.cpp | 17 | Key Not Found | Creating an Invalid entity | 2AA

-For our purposes, the "Handle" is the last entry (2AA)  The handle uniquely identifies the entity and we can use the handle to find it.

-To find the entity in the example above, the user would would type:

(entget(handent "2aa"))

...in the command line and enter. 

You would see a listing as below:

((-1 . <Entity name: 6287ef8>) (0 . "TEXT") (5 . "2AA") (67 . 0) (8 . "Test Layer") (62 . 256) (6 . "ByLayer") (370 . -1) (347 . <Entity name: 0>) (284 . 0) (48 . 1.00000) (60 . 0) (39 . 0.000000) (10 19.2253 8.73061 0.000000) (40 . 15.9952) (1 . "A") (50 . 0.000000) (41 . 1.00000) (51 . 0.000000) (7 . "Standard") (71 . 0) (72 . 0) (11 0.000000 0.000000 0.000000) (210 0.000000 0.000000 1.00000) (73 . 0))

Note the items highlighted in Red:
 

(0 . "TEXT")     The entity type is Text
(10 19.2253 8.73061 0.000000)  The XYZ (E,N,Elev) coordinates are 19.2253,8.73061,0.000000
(8 . "Test Layer")   The layer is Test Layer

We see the same properties when we list the same entity:


---------- Text ---------------------------------------------------
                  Handle:  2AA
           Current space:  Model
                  
Layer:  Test Layer
                   Color:  BYLAYER
                Linetype:  ByLayer
              Lineweight:  -1
              Text style:  Standard
        
Insertion point:  X=   19.225  Y=   8.731  Z=   0.000
             Text height:  15.995
              Text value:  A
          Rotation angle:  E
              Generation:  Normal
      Vertical alignment:  Baseline
    Horizontal alignment:  Left

-Now that we know the entity type, layer and position of the entity we may be able to find it and delete it from the drawing.
-Repeat the above process until all entities from the error log are removed
Save the drawing, and test it for issues.


If it is free of errors proceed to the FINAL step below:
If not, please continue:

 

3. Drawing Cleanup Wizard

MicroSurvey CAD 2010 Service Pack 2 has a new tool in MsTools | Drawing Cleanup Wizard
This feature is a collection of steps that experienced users would apply when trying to repair a drawing all packed into a single dialog.

Most options are fairly safe but you will want to pay close attention to some of the options:

"Delete Proxy Entities" Proxy Entities are, in general, entities which IntelliCAD simply does not support.  They are usually 3D entities which are editable only by Autodesk products.  Use this feature if you do NOT plan to pass this drawing on to a Civil 3D user with all the 3D entities intact.
"Delete Hatch Etities" These entities can use a lot of memory and you may have reasons to remove all of them.  Hatches are never used by any of the program's survey functions but you may have invested valuable time in creating these hatches and don't want them all deleted, so consider your purpose before leaving this checkbox on.
"Delete Raster Images" Raster images attached by other CAD programs can sometimes cause issues in an Intellicad file.  The image file itself won't be deleted but the entity responsible for placing, orienting and scaling the image in the drawing will be removed. If you need to retain the position of the raster image before it is removed type "list" in the command line, pick the raster frame and take note of the coordinates.  Later you can reinsert the raster using View | Raster | Attach Image
"Delete Dimensions" This option will remove dimensions added by CAD programs, but won't affect dimensions added in the MsAnnotate menu functions or any "Smart" labels connected with the MicroSurvey Database.
"Bind External References(xrefs) as blocks" This is a wise step if you have all available xrefs available and intend to amalgamate all files into one single drawing.   It will make your drawing larger and will no longer allow other users do update the xref drawings separately.
"Explode Blocks (including Bound XRefs)" This will make your drawing much larger and harder to work with.  Use with caution!

The Cleanup routine will present you with a report which you can add to your clipboard and paste into Notepad to save, this may help you find a cause of your error(s.)
Save the drawing, and test it for issues.


If it is free of errors proceed to the FINAL step below:
If not, please continue:

4. "Blocking Out" the Contents of Model Space.

Sometimes drawing errors are found in layout space or are attached to entities which cannot be selected for deletion. This step will eliminate all your layout space work but the model space work upon which the MicroSurvey database depends can be preserved:

-Open IntelliCAD Explorer to thaw, unlock and turn on all layers
-type "wblock" in the command line
-set the directory and file name for the block (I would suggest the same directory the drawing is in and <Drawing name>_Blocked out.dwg)
-Hit Enter
-Enter 0,0,0 as the insertion point
-Zoom way back and window in all visible entities.  Do not select "All"
-Hit Enter
-The entities will vanish but now you can close the drawing without saving the changes so they will be safe.
-Open Project Manager and use "Browse for Drawing" to navigate to the folder where you stored <Drawing name>_Blocked out.dwg
-Open the drawing and check for errors.


If it is free of errors proceed to the FINAL step below:
If not, please continue:


5. Further Drawing Audit Options

IntelliCAD's drawing Audit routine usually gets the job done, but if it fails to resolve a problem further action may be necessary.

-If the drawing came from a different company, it may be possible to contact them and ask them to audit the original file that they sent you in the program that was used to create it.

-If you have a different dwg program available you may wish to audit the drawing in that program.  Use File | Save as... and pick an older dwg format from the "Save as Type" pulldown if the program is not able to open current dwg formats.  You may wish to change the name to prevent overwriting your current file.

-If the drawing was provided to you by a different company you may wish to contact them and ask that they perform a drawing audit. 

-Alternatively you can use Autodesk's free "DWG TrueView" to convert the file to an older format.  The drawing conversion utility also checks for errors while it converts.  See this article for more details.

Once opened in a different dwg program the routine is the same as in MicroSurvey CAD: Type "audit" in the command line and watch the command line for results.

If it is free of errors proceed to the FINAL step below:
If not, please continue:

6. Older Format

Sometimes saving a drawing to an older format and repeating the above steps can get you a better result.  Older formats do not support certain newer entity types which may be causing the problem, and this is a strategy for removing those entities.

If it is free of errors proceed to the FINAL step below:
If not, please continue:

7. Contact Technical Support

One of the reasons tech support is here is to help with "broken drawings."  Create a Tech Support ticket at the link below, be sure to zip the file and attach it to the ticket.  Sometimes files that are larger than 2 mb get stuck in our email system so it may be wise to send the first message without the attachment but with a warning that an attachment is coming, and then reply to the automatic message Helpdesk sends you with the actual attachment.  We will know to check if the file is stuck if you do that.

Contact Tech Support here

If it is free of errors proceed to the FINAL step below:

 



8. FINAL STEP

 

Now that the "_SavedWithErrors" version is fixed it must be re-associated with the original .msz file:

-Save the drawing and close it.
-Open Windows Explorer and browse to the location <Drawing name>_SavedwithErrors.dwg is stored
-Make a new temporary folder.
-Right click and copy three files:
-<Drawing name>_SavedwithErrors.dwg
-<Drawing name>.msz
-(and if log file output is toggled on)<Drawing name>.rtf

**Note: If you are unable to view the three letter extensions of some of your files you may need to configure your Windows Systm to allow their display.  Pick on this link if you have Windows XP, this link if you have Windows 7 or Vista for a guide.


-Navigate inside of your new folder, right click and paste.

-Now return to MicroSurvey CAD and open the Project Manager
-Pick "Browse for Drawing" and navigate to your new temporary folder and pick on <Drawing Name>
-Put a check mark in "Audit Database and Drawing on Load" (this will check the link between your database and drawing, it is not a drawing audit)
-Now open <Drawing Name>
-You may need to respond to any errors that arise during the Drawing/Database audit
-Test your drawing carefully for issues.

If all appears well you can save your drawing from the temporary directory into the original working directory and go back to business as usual.

(105 vote(s))
Helpful
Not helpful

Comments (0)