.NET

Reply
Contributor
Nk_long
Posts: 15
Registered: ‎05-31-2012
Message 1 of 8 (593 Views)
Accepted Solution

GetEntity with Filter

593 Views, 7 Replies
06-14-2012 01:14 AM

How to GetEntity with filter?

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,

*Expert Elite*
Alfred.NESWADBA
Posts: 9,071
Registered: ‎06-29-2007
Message 2 of 8 (591 Views)

Re: GetEntity with Filter

06-14-2012 01:24 AM in reply to: Nk_long

Hi,

 

does >>>this<<< help?

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
*Expert Elite*
chiefbraincloud
Posts: 753
Registered: ‎02-13-2008
Message 3 of 8 (564 Views)

Re: GetEntity with Filter

06-14-2012 08:57 AM in reply to: Alfred.NESWADBA

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
Contributor
Nk_long
Posts: 15
Registered: ‎05-31-2012
Message 4 of 8 (535 Views)

Re: GetEntity with Filter

06-14-2012 08:29 PM 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,

Distinguished Contributor
eljobe
Posts: 704
Registered: ‎01-24-2003
Message 5 of 8 (511 Views)

Re: GetEntity with Filter

06-15-2012 08:21 AM 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.

Contributor
rmdw
Posts: 16
Registered: ‎04-04-2011
Message 6 of 8 (155 Views)

Re: GetEntity with Filter

05-22-2014 07:23 PM 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

Distinguished Contributor
SEANT61
Posts: 125
Registered: ‎09-23-2008
Message 7 of 8 (129 Views)

Re: GetEntity with Filter

05-24-2014 03:36 AM in reply to: rmdw

Have yout tried:

 

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

Distinguished Contributor
SEANT61
Posts: 125
Registered: ‎09-23-2008
Message 8 of 8 (126 Views)

Re: GetEntity with Filter

05-24-2014 03:49 AM 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

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.