Getting started with - selecting objects

This may possibly be a very silly or trivial question, but having discovered today I can’t understand how to find the object in a file I want to work with.

Say I have an existing 3dm file created in rhino containing multiple surfaces with user text attached to each. Later I want to use a python script with rhino3dm to find a particular surface (identified by the attached user data) in the model file, and change its layer, for example.

Or in fact, say I want to change the layer of every single surface in the file?

It seems I’d probably use rhino3dm.ObjectAttributes.Layerindex() to change the layer, but how do I select the surface(s) that I want to change/pass to LayerIndex as parameters?

If writing a script in rhino I’d use rhinoscriptsyntax.ObjectsByType() or similar - what is the equivalent in

Hi Ferg,

Not working with, but maybe my pointers can help.

You can go through all objects in the ObjectTable (

You can query each object for the existence of the user text

I guess with File3dmObject.Attributes.GetUserString(key)
But I’m not sure if that is available this way for


Thanks very much Willem, it certainly does seem like File3dmObjectTable is part of the answer to my situation.

I’ve also since found these examples:
which I hope will help anyone in a similar situation.