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.
@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
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
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
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
Alexander.Rivil
http://adn-cis.org/forum/index.php?topic=7683.msg25135#msg25135
Thank you
If you are still interested in selecting multiple nested entities, see if these 2 articles are of help (pure .NET API solution):
https://drive-cad-with-code.blogspot.com/2019/08/select-multiple-nested-entities-1.html
https://drive-cad-with-code.blogspot.com/2019/08/selecting-multiple-nested-entities-2-of.html