.NET
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

Selection of multiple nested entities

7 REPLIES 7
Reply
Message 1 of 8
fred.schippers
1677 Views, 7 Replies

Selection of multiple nested entities

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.

7 REPLIES 7
Message 2 of 8


@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) 

Š’Ń–Š“ŠæŠ¾Š²Ń–Š“ь ŠŗŠ¾Ń€ŠøсŠ½Š°? ŠšŠ»Ń–ŠŗŠ½Ń–Ń‚ŃŒ Š½Š° "Š’ŠŸŠžŠ”ŠžŠ‘ŠŠ™ŠšŠ£" ціŠ¼ ŠæŠ¾Š²Ń–Š“Š¾Š¼Š»ŠµŠ½Š½ŃŠ¼! | Do you find the posts helpful? "LIKE" these posts!
ŠŠ°Ń…Š¾Š“ŠøтŠµ сŠ¾Š¾Š±Ń‰ŠµŠ½Šøя ŠæŠ¾Š»ŠµŠ·Š½Ń‹Š¼Šø? ŠŸŠ¾ŃŃ‚Š°Š²ŃŒŃ‚Šµ "ŠŠ ŠŠ’Š˜Š¢Š”ŠÆ" этŠøŠ¼ сŠ¾Š¾Š±Ń‰ŠµŠ½ŠøяŠ¼!
ŠŠ° Š²Š°ŃˆŠµ Š·Š°ŠæŠøтŠ°Š½Š½Ń Š²Ń–Š“ŠæŠ¾Š²Ń–Š»Šø? ŠŠ°Ń‚ŠøсŠ½Ń–Ń‚ŃŒ ŠŗŠ½Š¾ŠæŠŗу "ŠŸŠ Š˜Š™ŠŠÆŠ¢Š˜ Š Š†ŠØŠ•ŠŠŠÆ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
ŠŠ° Š²Š°Ńˆ Š²Š¾ŠæрŠ¾Ń усŠæŠµŃˆŠ½Š¾ Š¾Ń‚Š²ŠµŃ‚ŠøŠ»Šø? ŠŠ°Š¶Š¼ŠøтŠµ ŠŗŠ½Š¾ŠæŠŗу "Š£Š¢Š’Š•Š Š”Š˜Š¢Š¬ Š Š•ŠØŠ•ŠŠ˜Š•"


Alexander Rivilis / ŠŠ»ŠµŠŗсŠ°Š½Š“р Š ŠøŠ²ŠøŠ»Šøс / ŠžŠ»ŠµŠŗсŠ°Š½Š“р Š Ń–Š²Ń–Š»Ń–с
Programmer & Teacher & Helper / ŠŸŃ€Š¾Š³Ń€Š°Š¼Š¼Šøст - Š£Ń‡ŠøтŠµŠ»ŃŒ - ŠŸŠ¾Š¼Š¾Ń‰Š½ŠøŠŗ / ŠŸŃ€Š¾Š³Ń€Š°Š¼Ń–ст - Š²Ń‡ŠøтŠµŠ»ŃŒ - ŠæŠ¾Š¼Ń–чŠ½ŠøŠŗ
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 8

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

Message 4 of 8

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

Š’Ń–Š“ŠæŠ¾Š²Ń–Š“ь ŠŗŠ¾Ń€ŠøсŠ½Š°? ŠšŠ»Ń–ŠŗŠ½Ń–Ń‚ŃŒ Š½Š° "Š’ŠŸŠžŠ”ŠžŠ‘ŠŠ™ŠšŠ£" ціŠ¼ ŠæŠ¾Š²Ń–Š“Š¾Š¼Š»ŠµŠ½Š½ŃŠ¼! | Do you find the posts helpful? "LIKE" these posts!
ŠŠ°Ń…Š¾Š“ŠøтŠµ сŠ¾Š¾Š±Ń‰ŠµŠ½Šøя ŠæŠ¾Š»ŠµŠ·Š½Ń‹Š¼Šø? ŠŸŠ¾ŃŃ‚Š°Š²ŃŒŃ‚Šµ "ŠŠ ŠŠ’Š˜Š¢Š”ŠÆ" этŠøŠ¼ сŠ¾Š¾Š±Ń‰ŠµŠ½ŠøяŠ¼!
ŠŠ° Š²Š°ŃˆŠµ Š·Š°ŠæŠøтŠ°Š½Š½Ń Š²Ń–Š“ŠæŠ¾Š²Ń–Š»Šø? ŠŠ°Ń‚ŠøсŠ½Ń–Ń‚ŃŒ ŠŗŠ½Š¾ŠæŠŗу "ŠŸŠ Š˜Š™ŠŠÆŠ¢Š˜ Š Š†ŠØŠ•ŠŠŠÆ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
ŠŠ° Š²Š°Ńˆ Š²Š¾ŠæрŠ¾Ń усŠæŠµŃˆŠ½Š¾ Š¾Ń‚Š²ŠµŃ‚ŠøŠ»Šø? ŠŠ°Š¶Š¼ŠøтŠµ ŠŗŠ½Š¾ŠæŠŗу "Š£Š¢Š’Š•Š Š”Š˜Š¢Š¬ Š Š•ŠØŠ•ŠŠ˜Š•"


Alexander Rivilis / ŠŠ»ŠµŠŗсŠ°Š½Š“р Š ŠøŠ²ŠøŠ»Šøс / ŠžŠ»ŠµŠŗсŠ°Š½Š“р Š Ń–Š²Ń–Š»Ń–с
Programmer & Teacher & Helper / ŠŸŃ€Š¾Š³Ń€Š°Š¼Š¼Šøст - Š£Ń‡ŠøтŠµŠ»ŃŒ - ŠŸŠ¾Š¼Š¾Ń‰Š½ŠøŠŗ / ŠŸŃ€Š¾Š³Ń€Š°Š¼Ń–ст - Š²Ń‡ŠøтŠµŠ»ŃŒ - ŠæŠ¾Š¼Ń–чŠ½ŠøŠŗ
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 5 of 8

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

 

Have found similar question here, but it was not answered šŸ˜ž

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

Message 6 of 8

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:D",...); 

Š’Ń–Š“ŠæŠ¾Š²Ń–Š“ь ŠŗŠ¾Ń€ŠøсŠ½Š°? ŠšŠ»Ń–ŠŗŠ½Ń–Ń‚ŃŒ Š½Š° "Š’ŠŸŠžŠ”ŠžŠ‘ŠŠ™ŠšŠ£" ціŠ¼ ŠæŠ¾Š²Ń–Š“Š¾Š¼Š»ŠµŠ½Š½ŃŠ¼! | Do you find the posts helpful? "LIKE" these posts!
ŠŠ°Ń…Š¾Š“ŠøтŠµ сŠ¾Š¾Š±Ń‰ŠµŠ½Šøя ŠæŠ¾Š»ŠµŠ·Š½Ń‹Š¼Šø? ŠŸŠ¾ŃŃ‚Š°Š²ŃŒŃ‚Šµ "ŠŠ ŠŠ’Š˜Š¢Š”ŠÆ" этŠøŠ¼ сŠ¾Š¾Š±Ń‰ŠµŠ½ŠøяŠ¼!
ŠŠ° Š²Š°ŃˆŠµ Š·Š°ŠæŠøтŠ°Š½Š½Ń Š²Ń–Š“ŠæŠ¾Š²Ń–Š»Šø? ŠŠ°Ń‚ŠøсŠ½Ń–Ń‚ŃŒ ŠŗŠ½Š¾ŠæŠŗу "ŠŸŠ Š˜Š™ŠŠÆŠ¢Š˜ Š Š†ŠØŠ•ŠŠŠÆ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
ŠŠ° Š²Š°Ńˆ Š²Š¾ŠæрŠ¾Ń усŠæŠµŃˆŠ½Š¾ Š¾Ń‚Š²ŠµŃ‚ŠøŠ»Šø? ŠŠ°Š¶Š¼ŠøтŠµ ŠŗŠ½Š¾ŠæŠŗу "Š£Š¢Š’Š•Š Š”Š˜Š¢Š¬ Š Š•ŠØŠ•ŠŠ˜Š•"


Alexander Rivilis / ŠŠ»ŠµŠŗсŠ°Š½Š“р Š ŠøŠ²ŠøŠ»Šøс / ŠžŠ»ŠµŠŗсŠ°Š½Š“р Š Ń–Š²Ń–Š»Ń–с
Programmer & Teacher & Helper / ŠŸŃ€Š¾Š³Ń€Š°Š¼Š¼Šøст - Š£Ń‡ŠøтŠµŠ»ŃŒ - ŠŸŠ¾Š¼Š¾Ń‰Š½ŠøŠŗ / ŠŸŃ€Š¾Š³Ń€Š°Š¼Ń–ст - Š²Ń‡ŠøтŠµŠ»ŃŒ - ŠæŠ¾Š¼Ń–чŠ½ŠøŠŗ
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 7 of 8

any chance of getting the sample code from the dead link from the comment in the linked post?

http://adn-cis.org/forum/index.php?topic=7683.msg25135#msg25135

 

Thank you

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
Message 8 of 8

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

ā€Boost