.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
1676 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