Convert Object User Text to Attribute UserText

Hello All,

I am wondering if it is possible to “convert” user text to Attribute user text.
Reason being i often receive geometry with Object user text and i would like to view the parameters in the Attribute User Text panel which is more convenient than using every time the getusertext command

Thanks in advance!

2021-06-11_11-51-18

import rhinoscriptsyntax as rs
objs = rs.GetObjects("Select objects")
for obj in objs: 
  if obj:
    for key in rs.GetUserText(obj, None, True):
      value = rs.GetUserText(obj, key, True)
      rs.SetUserText(obj, key, value, False)

SetUserText.py (259 Bytes)

1 Like

Thanks alot @Mahdiyar!!!