I am developing RhinoCommon plugIn that should be easily extended with Grasshopper components.
My idea is, that Rhino plugIn will provide geometry data, Grashopper will do some transformation and returns the result back.
Both parts are ready and they already communicate through shared project. What I would like to achive is the ability to first prototype the Grashopper document, then save it and later be able to evaluate it without Grashopper UI.
I was able to load Grashopper and open the test document prom the plugIn, but when I wasn’t able to do it without the grashopper editor being open. Is there some way how to do it?
_grashopper = RhinoApp.GetPlugInObject("Grasshopper") as GH_RhinoScriptInterface;
var success = _grashopper.OpenDocument(testFilePath);
Thanks, though, from a quick look it seems the post deals with different issue.
It provides a GH script that is able to run another GH script. What I need is to run GH script from within Rhino C# plugIn without visualy showing grashopper window.
You can communicate with the local headless Rhino service that comes with Rhino 7 or do it online with Compute. Compute also has a protocol to send geometry a Grasshopper set of definitions and get results back from the process.
If you want to setup the project with a Rhino plugin that can call out to solve a Grasshopper definition without Grasshopper running then you can setup this style of project: Calling Compute with .NET with Csharp
Hello Scott, I have one extra question. Is it possible to execute any of those options you described on background thread? I quess it would be easily doable with Rhino.Compute, but if possible, I would like to do everything locally.