Product : Engine, Version : 5.1.1.1038, ArticleID : 41024150

Bug : New method to recover drawings with unsupported characters in layerName for DWG/DXF format

Article41024150
TypeBug
ProductEngine
Version5.1.1.1038
Date Added11/17/2005
FixedYes [11/17/2005]
Submitted byWayne Romer
Keywords

Subject

New method to recover drawings with unsupported characters in layerName for DWG/DXF format

Summary

I am trying to export the attached document to a dxf. I have to rename all of the layers to remove the "\" symbol.... however... it still fails to open in AutoCAD. Please can you point me in the right direction. The error returned in AutoCAD is as follows.

Solution


In version 5.1.1.1039 a new method Recover was added in VdDocument object.

syntax: ActiveDocument.Recover(ReturnErroInfoOnly As Boolean) As Variant

 

 Try to recover most commonly drawing errors that make the drawing invalid when saving in dxf/dwg format:
1. recover invalid or duplicated handles
2. adds in the layers collection no existing object layer names
3. recover Invalid characters in object table name(Invalid characters for dwg/dxf are <>/\"':;?*,=).

 If ReturnErroInfoOnly == true the do not recover the drawings and returns an array of string for each existing error
 If ReturnErroInfoOnly == false then return the errorinfo string array and recover the drawing.
 After the recover the changes can not be undone.
 If call the method with ReturnErroInfoOnly == true and the return array is empty then no Recover is needed
 NOTE: Use this method only with drawings having problems in dwg/dxf saving