Geometry from InstanceDefinitionGeometry in a FileIO.File3dm

I am trying to get the geometry of a blockdefintion from an external 3dm-file.
When I try this, I get the Rhino.GeometryInstanceDefinition.Geometry…
I am stuck at the point where I can process the “content” of this geometry (curves, lines, surfaces, breps, …).

data =  Rhino.FileIO.File3dm.Read(path)
for n in data.AllInstanceDefinitions:
    sc.doc.InstanceDefinitions.Add(n.Name, "", Rhino.Geometry.Point3d(0,0,0), [n])

When I look at the documentation of the InstanceDefinitionGeometry I find everything like Name, etc… but I cannot get it’s content?
What am I missing?


1 Like

I assume this one is the block definition itself…

And the contents seem to be accessible by this

But this one does not have a Property “.Geometry”…
What you describe is the InstanceDefinition, here I receive a InstanceDefinitionGeometry!

I think you can get the Ids by this.

Then, search File3dm.Objects

by the Id.

1 Like

@mikity_kogekoge that worked like a charm!