Quantcast
Viewing all articles
Browse latest Browse all 14319

Unable to read the attached DXF using Database.DXFIn()

Hi,

 

I am new to the RealDWG. I am trying to read the dxf file using RealDWG. Most of the files do come in correctly. But there are some files where DXFIn() api just hangs. It does not throw any error or comes out of the API call, but simply hangs. 

 

If I Open and then Save the attached file in latest AutoCAD(AutoCAD 14) in dxf format only then DXFIn function executes properly. 

 

It looks like the version compatibility issue of dxf files. But what I am interested in is that how should I figure out which files needs to be resaved before my application hangs.

 

Here is the code I am using.

 

this.database = new Database(false/*build empty object*/, true/*assiciate this database to current document*/);

public void ReadFile(string fileName)

{

string fileExt = Path.GetExtension(fileName);
if(fileExt.Equals(".dxf", StringComparison.InvariantCultureIgnoreCase))
this.database.DxfIn(fileName, this.logFilePath);
else
this.database.ReadDwgFile(fileName, FileOpenMode.OpenForReadAndReadShare, false /*allowCPConversion*/, string.Empty/*password*/);

.

.

.

.

 

}

 

Thanks,

Sandeep

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 14319

Trending Articles