How to add my custom document/object user data to File3dm?

I have both document user data and object user data in my plugin.

To keep from data breach, I will not save a 3dm file on local machine.
I keep those data in my document(RhinoDoc) by assign them into File3dm class and change it into bytes.
Then, directly upload those bytes to server.

But I don’t know how to add my custom document/object user data to File3dm.
Is there any way to solve this issue?

Thank you very much.

1 Like

Hi @jamie.lin,

RhinoCommon does not provide a way to write directly a 3dm file’s plug-in data table. When saving a 3dm file from Rhino, there is where your plug-in’s custom document user data is archived.

You might consider converting your custom user data class to a string and then saving it to the 3dm file’s string table. The string can be in any form, such as JSON, XML or event Base64.

– Dale

Hi @dale ,

Thank you for the suggestion.
The information is quite useful to me.

Thanks again.