.NET

Reply
Member
Posts: 3
Registered: ‎05-16-2012
Message 1 of 6 (201 Views)

Selection of multiple nested entities

201 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,346
Registered: ‎04-09-2008
Message 2 of 6 (185 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
Posts: 3
Registered: ‎05-16-2012
Message 3 of 6 (182 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,346
Registered: ‎04-09-2008
Message 4 of 6 (179 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
Posts: 3
Registered: ‎05-16-2012
Message 5 of 6 (176 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,346
Registered: ‎04-09-2008
Message 6 of 6 (167 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community