.NET

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

GetEntity with Filter

616 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,371
Registered: ‎06-29-2007
Message 2 of 8 (614 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 (587 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 (558 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 (534 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 (178 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: 137
Registered: ‎09-23-2008
Message 7 of 8 (152 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: 137
Registered: ‎09-23-2008
Message 8 of 8 (149 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!