algorithmic modeling for Rhino
Hello all
I am working in a Grasshopper project using C# and Visual Studio 2012. I would like to know how can I get my current Grasshopper document to work with it. For example, I have declared my variable:
private GH_Document GrasshopperDocument;
But GH_Document doesn't have any methods to get my active document.
Can someone help me? I'd like to do this
private GH_Document GrasshopperDocument = GH_Document.GetMyActiveDocumentSomehow;
Thank you very much
Tags:
within a GH_Component class, you can get the active document with this.OnPingDocument().
Just stumbled upon this and it was exactly the information I needed. Thanks from me too :)
Just note that that method may return null under certain conditions. Be sure to check for that.
Hi David,
I am trying to expose the equivalent functionality in Visual Studio provided by the 'GrasshopperDocument' variable in the C# component. Is this the best way to go about it? Does the C# component use a different method which avoids the 'null' problem?
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by