AnsweredAssumed Answered

Opening big cad file exception

Question asked by m.abushalaby on Jul 3, 2018

Hi All, after opening big cad file in a IFeatureWorkspace using this command IFeatureWorkspace.OpenFeatureDataset(dwgfilename)
it works will but when opens another one again an exception appeared(System.Runtime.InteropServices.COMException).

 

code like this:
IWorkspaceFactory pWorkspaceFact = new CadWorkspaceFactory();
IWorkspace pWorkspace = null;// default(IWorkspace);
pWorkspace = pWorkspaceFact.OpenFromFile(dwgpath, 0);
IFeatureWorkspace pFeatureWorkspace = default(IFeatureWorkspace);
pFeatureWorkspace = (IFeatureWorkspace)pWorkspace;

IFeatureClass pFeatClass = default(IFeatureClass);
IFeatureDataset pFeaturedataset = default(IFeatureDataset);

pFeaturedataset = pFeatureWorkspace.OpenFeatureDataset(dwgfilename);    // this line throw an exception 

Outcomes