How to get hold of referenced objects in a worksession

Hi,

In python I cannot find a way to get access to the objects in a referenced file in a worksession.
Any pointers to how to find existing references or the objects regerenced would be appreciated.

-Willem

EDIT
The solution I came up:

def GetAllReferenceObjects():
    
    filter_settings = Rhino.DocObjects.ObjectEnumeratorSettings()
    filter_settings.ActiveObjects = False
    filter_settings.ReferenceObjects = True

    return scriptcontext.doc.Objects.FindByFilter(filter_settings)
2 Likes