getting entites of .dwg-file without visual control
Moderators: SDS, support, admin
getting entites of .dwg-file without visual control
Hello,
i want to get all the entities stored in one .dwg-file. Im using the current test version of the CADImport.NET.
If i load the file with the EditorDemo application, i can see all existing entities. If i start the following code, the entity-collection remains empty:
CADImport.CADImage cadImage = new CADImport.CADImage();
cadImage.LoadFromFile(@"C:\Temp\file.dwg");
CADEntityCollection entities = cadImage.Converter.Entities;
int x = entities.Count; // <---------- 0
Can anyone help me out?
Thanks,
Philipp
i want to get all the entities stored in one .dwg-file. Im using the current test version of the CADImport.NET.
If i load the file with the EditorDemo application, i can see all existing entities. If i start the following code, the entity-collection remains empty:
CADImport.CADImage cadImage = new CADImport.CADImage();
cadImage.LoadFromFile(@"C:\Temp\file.dwg");
CADEntityCollection entities = cadImage.Converter.Entities;
int x = entities.Count; // <---------- 0
Can anyone help me out?
Thanks,
Philipp
Re: getting entites of .dwg-file without visual control
Hello Philipp.
CAD Import .NET allows import files of different formats, for example DXF, DWG, PLT etc. The library contains the set of classes derived from CADImage. Each class provided for import data from single supported format. For example, DWG can be imported to object of DWGImage class only. We recommend using CADImage.CreateImageByExtension method to specify required class:Another way is create an object of DWGImage class instead CADImage.
Alexander.
CAD Import .NET allows import files of different formats, for example DXF, DWG, PLT etc. The library contains the set of classes derived from CADImage. Each class provided for import data from single supported format. For example, DWG can be imported to object of DWGImage class only. We recommend using CADImage.CreateImageByExtension method to specify required class:
Code: Select all
CADImport.CADImage cadImage = new CADImport.CADImage();
cadImage = CADImage.CreateImageByExtension(@"C:\Temp\file.dwg");
cadImage.LoadFromFile(@"C:\Temp\file.dwg");
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: getting entites of .dwg-file without visual control
Hello Alexander,
thank you very much.
Best regards,
Philipp
thank you very much.
Best regards,
Philipp