I have a custom component in GH (C#) and I am accessing the active Document in GH to do some rewiring like so:
var activeCanvas = Grasshopper.Instances.ActiveCanvas; GH_Document doc = activeCanvas.Document;
However the activeCanvas when running this definition in RhinoCompute returns
null. Is there another way to access the GH_Document while in RhinoCompute, or this is not allowed?