Get User Text directly in rhino?


we can access to the document user text from panel, like properties, but, is i possible to access to the User Text of an rhino Object? I can get it with a script, but is there another way?


Hi -

I’m not sure what, exactly, you are trying to do. You can access the object’s user text from the Properties panel under the Attribute User Text tab.

1 Like

yes!!! that’s it…

but i search to delete one or all user text of an object with python script…

i Found GetUserText, SetUSerText, IsUserText, DeleteDocumentData, but not DeleteUserText…

Ok… i found this from @clement

import rhinoscriptsyntax as rs

def DoSomething():
    id = rs.GetObject("Object", 0, True, True)
    if not id: return
    keys = rs.GetUserText(id, None, False)
    for key in keys:
        value = rs.GetUserText(id, key, False)
        rs.SetUserText(id, key, None, False)