Iterate entities into dwg file
Moderators: SDS, support, admin
Iterate entities into dwg file
Hy,
I want to iterate from one layer all their entities, could do you help me?
I load a dwg file using editor control for your professional version (CADImport .Net). But I don't find some method that enable to do it from CADImport.CADImportControls.CADEditorControl object.
Thank you very much indeed.
Monty
I want to iterate from one layer all their entities, could do you help me?
I load a dwg file using editor control for your professional version (CADImport .Net). But I don't find some method that enable to do it from CADImport.CADImportControls.CADEditorControl object.
Thank you very much indeed.
Monty
Re: Iterate entities into dwg file
Hello Monty,
Please try the following code:
Sergey.
Please try the following code:
Code: Select all
private void button1_Click(object sender, System.EventArgs e)
{
CADImport.CADEntity ent;
int entNumber = this.cadEditorControl.Image.Converter.GetCounts(CADImport.FaceModule.ConvSection.Entities);
for (int i=0;i<entNumber;i++)
{
ent = (CADImport.CADEntity)this.cadEditorControl.Image.Converter.GetSection(CADImport.FaceModule.ConvSection.Entities).Entities[i];
if (ent.Layer.Name == "sought_for_layer")
{
//Do necessary actions
}
}
}
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support