.NET

.NET

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

Selection of multiple nested entities

286 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,458
Registered: ‎04-09-2008
Message 2 of 6 (270 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 (267 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,458
Registered: ‎04-09-2008
Message 4 of 6 (264 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 (261 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,458
Registered: ‎04-09-2008
Message 6 of 6 (252 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
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.