Reading PlugIn Data from a 'template' 3dm file

I would like to offer the user of my plug-in the opportunity to create a template file that has preferred plug-in specific document settings and other objects already set/created. Then when they open Rhino with the plug-in loaded, they can have this template file specified in the Options page and it will read in only the plug-in related data into the new file being created. I know I can read in plug-in specific data by overriding ReadDocument but how can I read in plug-in data from another document using RhinoCommon/C#?

Hi @jakemurphy0118,

In Rhino 6, you can use a File3dm class object to read a .3dm file. Once read, you can read the user strings off of objects or the document.

For Rhino 7, we’ve added the ability to read custom plug-in document and object user data:

https://mcneel.myjetbrains.com/youtrack/issue/RH-60129
https://mcneel.myjetbrains.com/youtrack/issue/RH-60693

At some point, we will hook up the ability to read data from a user dictionary and user data attached to other things, such as layers.

Hope this helps.

– Dale