How to import a block object

Hi all,

i try to import a block object from one 3dm file to another via rhino api but i had no success.

has anyone any tip how i get accsess not only to the block but also to the geometry inside the block.



have no option to access the geometry



Have no option to get block properties like block.names

Any tip is always welcome
Thanks in advanced

Cant test it right now, but:

        foreach(var id in file.AllInstanceDefinitions)
            var guids =  id.GetObjectIds();

            foreach(var guid in guids)
                var obj = file.Objects.FindId(guid);

you should be able to get the geometry from obj via obj.Geometry.

rgr thanks for the tip, will check that out

Ok how the hell do you know this


because in the InstanceDefinitionTable Class is nothing about that.

File = rh.FileIO.File3dm.Read(x)
for i in File.AllInstanceDefinitions:
    ObjId = i.GetObjectIds()
    for o in ObjId:

Thanks a lot for your example works like a charm.

Visual Studio has some nice features :wink: