How to get entities in the layer ?
Moderators: SDS, support, admin
How to get entities in the layer ?
I'd like to get entities in the layer, but CADLayer.Entities is always null.
... and, this forum seach rejects my search "How to get entities in layer" because of too common words.
Some good way?
... and, this forum seach rejects my search "How to get entities in layer" because of too common words.
Some good way?
Re: How to get entities in the layer ?
Hi,
You can get the entities in one certain layer using the following code:
You can find out more in the following post: viewtopic.php?f=15&t=4906&p=13724&hilit=layers#p13724
Andrey
You can get the entities in one certain layer using the following code:
Code: Select all
public List<CADEntity> GetAllLayerEntities(CADImage img, string layerName)
{
List<CADEntity> ResList = new List<CADEntity>();
for (int i = 0; i < img.Converter.Entities.Count; i++)
{
CADEntity ent = img.Converter.Entities[i];
if (ent.Layer.Name == layerName)
{
ResList.Add(ent);
}
}
return ResList;
}
Andrey
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: How to get entities in the layer ?
Thank you Andrey.