GetEntity with Filter

GetEntity with Filter

Anonymous
Not applicable
5,232 Views
7 Replies
Message 1 of 8

GetEntity with Filter

Anonymous
Not applicable

How to GetEntity with filter?

0 Likes
Accepted solutions (1)
5,233 Views
7 Replies
Replies (7)
Message 2 of 8

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

does >>>this<<< help?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 8

chiefbraincloud
Collaborator
Collaborator

I believe this would be more appropriate:

http://through-the-interface.typepad.com/through_the_interface/2008/07/conditional-sel.html

Dave O.                                                                  Sig-Logos32.png
0 Likes
Message 4 of 8

Anonymous
Not applicable
Accepted solution

Thanks. With SelectionSet I know how to create filter with a SelectionFilter. I want to find method for GetEntity. I found it in sample from Mr Kean WalmSley. We use PromptEntityOptions.AddAllowedClass(). But it's only filter for class, not all properties like color, linetype, layer...

See detail at here >>>>>>> this link<<<<<<<<<

 

Regard,

0 Likes
Message 5 of 8

Ed__Jobe
Mentor
Mentor

GetEntity will return a PromptEntityResult which contains the ObjectID of the entity selected. You can then open it for read and examine the ent's properties. If it doesn't meet your criteria, you can prompt them to select again.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 6 of 8

Anonymous
Not applicable

I got all excited at being able to define a simple entity filter like which was possible with (ssget) in AutoLisp.  I started using his approach but then quickly discovered that entities like "3DFACE" don't appear to have Type Classes defined in .NET.


Robert

0 Likes
Message 7 of 8

SEANT61
Advisor
Advisor

Have yout tried:

 

PromptEntityOptions.AddAllowedClass(typeof(Face), true);


************************************************************
May your cursor always snap to the location intended.
Message 8 of 8

SEANT61
Advisor
Advisor

With regard to the original query of this thread (granted, the thread is a few years old), a method of advanced filtering for an individual entity was discussed in this thread.  If the OP is still around, the concept may be of some interest.

 

http://www.cadtutor.net/forum/showthread.php?41648


************************************************************
May your cursor always snap to the location intended.
0 Likes