.NET

Reply
Member
3 Posts
0 Kudos
Registered: ‎05-16-2012
Post 1 of 6

Selection of multiple nested entities

292 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
1,468 Posts
277 Kudos
Registered: ‎04-09-2008
Post 2 of 6

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
3 Posts
0 Kudos
Registered: ‎05-16-2012
Post 3 of 6

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
1,468 Posts
277 Kudos
Registered: ‎04-09-2008
Post 4 of 6

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
3 Posts
0 Kudos
Registered: ‎05-16-2012
Post 5 of 6

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
1,468 Posts
277 Kudos
Registered: ‎04-09-2008
Post 6 of 6

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 interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!