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
Now i want to apply the same principle to the outline of a specific block.


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
735 x 481 - 12K


  • edited August 2019


    please define "block in block"
    -> geometric / location
    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 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