Affecting Objects UserData

hi, is it possible to affect simply an object user data without to use the Rhino.Input.GetOneObject() ? I ask this because it seems to be the way you interact with the user, what I don’t want.

if you know the id of the object to which you want to attach user data, then you can retrieve the object like this:

var rh_obj = doc.Objects.Find(id);

If you don’t know the id of the objects, then you have two options: 1.) pick the object using GetObject, or 2.) iterate the document’s ObjectTable and look for the object based on some properties you know about.