.NET

Reply
Member
fred.schippers
Posts: 3
Registered: ‎05-16-2012
Message 1 of 6 (245 Views)

Selection of multiple nested entities

245 Views, 5 Replies
01-11-2013 01:46 AM

There are blocks in the drawing, each containing several nested entities. Need a command which would find all the nested entities which got into the selection area provided by user (not necessary to select entities, just get the ids). GetNestedEntity() does what I need but for a single entity only. 

 

Selection of 'Trim' command does exactly what I need. How could I achieve the same behaviour?

 

Thank you.

Moderator
Alexander.Rivilis
Posts: 1,406
Registered: ‎04-09-2008
Message 2 of 6 (229 Views)

Re: Selection of multiple nested entities

01-11-2013 04:46 AM in reply to: fred.schippers

fred.schippers wrote:

... not necessary to select entities, just get the ids ...


It is easy to iterate BlockTableRecode and get all ObjectId's of subentities (except constant AttributeDefinition) 


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Member
fred.schippers
Posts: 3
Registered: ‎05-16-2012
Message 3 of 6 (226 Views)

Re: Selection of multiple nested entities

01-11-2013 04:48 AM in reply to: Alexander.Rivilis

I don't need all subentities, just those selected by user.

Moderator
Alexander.Rivilis
Posts: 1,406
Registered: ‎04-09-2008
Message 4 of 6 (223 Views)

Re: Selection of multiple nested entities

01-11-2013 04:53 AM in reply to: fred.schippers

Ok. What about Editor.GetSelection with argument PromptSelectionOptions with properties AllowSubSelections and ForceSubSelections equal true?


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Member
fred.schippers
Posts: 3
Registered: ‎05-16-2012
Message 5 of 6 (220 Views)

Re: Selection of multiple nested entities

01-11-2013 04:59 AM in reply to: Alexander.Rivilis

Doesn't work. Even blocks can not be selected in this case.

 

Have found similar question here, but it was not answered :smileysad:

http://forums.autodesk.com/t5/NET/Select-Nested/m-p/2046216/highlight/true#M7899

Moderator
Alexander.Rivilis
Posts: 1,406
Registered: ‎04-09-2008
Message 6 of 6 (211 Views)

Re: Selection of multiple nested entities

01-11-2013 05:55 AM in reply to: fred.schippers

It is look you are right. IMHO only way is using pure ObjectARX (not AutoCAD .NET API) like this: http://adndevblog.typepad.com/autocad/2012/08/acedssget-multi-select-in-n-mode.html

Or using P/Invoke in .NET to call acedSSGet(L"_N:U:smileyvery-happy:",...); 


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

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.