Iterate through Entities

Iterate through Entities

Anonymous
Not applicable
2,631 Views
3 Replies
Message 1 of 4

Iterate through Entities

Anonymous
Not applicable

Hello,

 

I am new to AutoCAD Customization and learning few things.

But I would like to know like we have model space and paper space, is it possible to iterate through entities of these.

 

Few Drawings may not be repeated in paper space.

 

It can have Blocks, Tables, Texts, Polylines. I need to iterate entities of these sheets separately.

 

Regards,

Kumuda

0 Likes
Accepted solutions (1)
2,632 Views
3 Replies
Replies (3)
Message 2 of 4

BKSpurgeon
Collaborator
Collaborator

Mr Spider has already answered your question here - I needn't repeat what he has said:

 

http://spiderinnet1.typepad.com/blog/2012/06/autocad-net-iterate-through-model-space.html

 

but what is your purpose in iterating through it all? it can be a very slow process if you have many objects in your drawing. maybe it is better if you used a selection filter. just get the objects you need and do what you need to do.

 

 

regards

 

Ben

0 Likes
Message 3 of 4

_gile
Consultant
Consultant
Accepted solution

@BKSpurgeon,

 

Iterating through entities is not slower than using selectAll with a SelectionFilter.

SelectAll does iterate through entities (how could it be otherwise).

See my reply in this topic.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 4 of 4

BKSpurgeon
Collaborator
Collaborator

Thank you Mr Gilles - that post is very good - i had completely forgotten about it!

 

rgds

0 Likes