RhinoCommon UserData List


I have two short questions regarding the User Data:

  1. What if want to have a List as a part of the UserData? Let us say List guids. How would this example look like? How would Read and Write functions look like?

  2. Is UserData attachable only to RhinoObjects? Or can some user data be attached to an (empty) Document?


Hi @dimcic,

  1. It depends: there are some methods on the archivableDictionary class that allow for storage of collections. For example If you have a list of guid you can store it like this:
    For every type not directly supported you need to do custom serialization and store them via

  2. Userdata can be attached to

  • Geometry
  • Attributes
  • Viewports
  • a rhino doc

And probably even more. You can search the RhinoCommon docs classes you want to store userdata on if they have the UserData property.

Hope this helps