.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetEntity with Filter

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Nk_long
4047 Views, 7 Replies

GetEntity with Filter

How to GetEntity with filter?

7 REPLIES 7
Message 2 of 8
Alfred.NESWADBA
in reply to: Nk_long

Hi,

 

does >>>this<<< help?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 8

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
Message 4 of 8
Nk_long
in reply to: chiefbraincloud

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,

Message 5 of 8
Ed.Jobe
in reply to: Nk_long

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

EESignature

Message 6 of 8
rmdw
in reply to: Nk_long

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

Message 7 of 8
SEANT61
in reply to: rmdw

Have yout tried:

 

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


************************************************************
May your cursor always snap to the location intended.
Message 8 of 8
SEANT61
in reply to: Nk_long

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost