.NET

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

Selection of multiple nested entities

275 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,449
Registered: ‎04-09-2008
Message 2 of 6 (259 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 (256 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,449
Registered: ‎04-09-2008
Message 4 of 6 (253 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 (250 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,449
Registered: ‎04-09-2008
Message 6 of 6 (241 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

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!