Grasshopper Component and RhinoDoc - C#


we are used to the Rhino Plug-in Development where we get the RhinoDoc passed to us in the RunCommand function. But what is the best way to use the document (and access Units, Tolerances, etc…) in a GH Component development?

My first guess would have been

RhinoDoc doc = RhinoDoc.ActiveDoc;

But that comes with a very nice “WARNING! Do not use ActiveDoc if you don`t have to…”

So…do I have to?


Yeah you have to. This warning is there because Rhino for Mac is multi-doc, so the notion of a single active one is less useful. But there is nothing in Grasshopper yet to deal with this. I imagine in GH2 there will be an association between the GH document and a specific RH document.