C++ UserData

Hi Guys,

Does anyone have an example or guidance for attaching UserData to a .3dm file?

I need to attach Int’s and Strings to the .3dm file. I would like to avoid linking to the geometry if possible.

Hi @Niko_Striega,

Start here:

There are samples in the developer samples repo on GitHub.

– Dale

Hi Dale,

Thanks for your response! It is much appreciated.
I think I am still missing something. I see the Object UserData is well explained, but I am getting lost on the Document UserData. Are there any Examples of Document UserData ?

Hi @Niko_Striega,

This large sample reads and writes document user data.

There are probably other samples. Just look for plug-in that override these:

CRhinoPlugIn::CallWriteDocument
CRhinoPlugIn::WriteDocument
CRhinoPlugIn::ReadDocument

– Dale

Thank you Dale,

All working now, that was a big help!