Get InstanceReferences from File3dm

Hi all,

Is there a way to get InstanceReferences Objects from File3dmInstanceDefinition in a similar way like from

import Rhino as rh
import scriptcontext as sc

Ta = rh.RhinoDoc.ActiveDoc.InstanceDefinitions
for i in Ta.GetList(True):
    print i.GetReferences(1)

Unfortunatly InstanceDefinitionGeometry has no GetReferences(1)
Any tip is welcome.
Thanks in advanced

Can you not implicitly convert from File3dmID to ID?

I used (pseudo code):

for object in FileIO.File3dm.Objects:
    if object.Geometry.ObjectType == Rhino.DocObjects.ObjectType.InstanceReference:
        # object is an instance reference...

I couldn’t find a built in way to filter them but this worked for me.

1 Like

thanks for your help,
works perfect