Hello everyone,
I’m trying to open GrasshopperPlayer using externall access with C#. I want to launch Rhino and Grasshopper in totally background. My only problem is that Grasshopper pops up during loading. How can I solve this problem?
using Rhino.Runtime.InProcess;
using Rhino;
namespace SonKoz
{
class Program
{
static Program()
{
RhinoInside.Resolver.Initialize();
}
[System.STAThread]
static void Main(string[] args)
{
using (new RhinoCore(new string[] { "/NOSPLASH" }, WindowStyle.Hidden))
{
string FileName = "C:\\Users\\ugurb\\Documents\\RhinoDenemeler\\SonKoz\\sampleee.igs";
RhinoApp.RunScript("_-GrasshopperPlayer C:\\Users\\ugurb\\Documents\\RhinoDenemeler\\SonKoz\\sample.gh 5 32",false);
RhinoApp.RunScript("_SelAll", false);
string cmd = "_-Export " + FileName + " _Enter";
RhinoApp.RunScript(cmd, false);
RhinoApp.RunScript("_Delete", false);
RhinoApp.RunScript("_Exit No", false);
}
}
}
}
sample.gh (8.2 KB)