Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Get all blocks inside a block

Hello everybody,

Im quit new to AutoCad and now i want do get a collection of all blocks wich are inside another block in my C#/.NET Plugin. I found a way to get all blocks in a Polyline (thanks to _gile https://forums.autodesk.com/t5/net/find-block-inside-a-polyline/td-p/7586489).
Now i want to apply the same principle to the outline of a specific block.

Example:

Block Edit View of Block Room A
See attached Block RoomA.png

Example i want to get de Blocks marked with pink.
See attached Example1.png

So my idea is to somhow geht de outlining lines of the block to form a new poly line and then use the solution from _gile mentioned above. I have acces to all room block in my file as they are all on the same layer.

Thanks for your help!

Block RoomA.png
431 x 454 - 9K
Example1.png
735 x 481 - 12K

Comments

  • edited August 29

    Hello,

    please define "block in block"
    -> geometric / location
    OR
    Datastructure -> BlockReferences inside BlockTableRecord?

    ~~lookat SelectionSet and TypedFilter. Using TypedFilter you can filter all blocks ( dxfcode 0 "Insert") and (dxfcode 8 layername)
    => GetAll(filter) creates the SelectionSet. (no polyline bounds) or use GetSElection(filter)
    Loop the SelectionSet , get the OID of the selected Obect AND/OR Convert the SeletionSet to ObjectIdCollection~~

Sign In or Register to comment.
Origami
Origami is the Japanese word for paper folding. ORI means to fold and KAMI means paper and involves the creation of paper forms usually entirely by folding.

Powered by VanillaForums, Designed by Steam