Run a command from the C#


#1

Hello to all I read this thread: https://discourse.mcneel.com/t/wait-until-rendering-is-finished/42935.
And the solution proposed by @matt_newberg works perfect if I run the script from Rhinoscript editor.
I need to run it from a C# code.
I have been trying many options, but obviolsy none of them had work.

                string vr = "V-Ray for Rhino";
                string code = string.Format("Dim VRay: Set VRay = Rhino.GetPluginObject({0}) : VRay.SetBatchRenderOn True", vr);
                string script = string.Format("!-_RunScript -_code");  //
                Rhino.RhinoApp.RunScript(script, true);

any help will be very appreciated.
kind regards
Carlos.


(Dale Fugier) #2

Hi @cidelab,

See the following:

– Dale


#3

Thank you @dale,
I will try it,
best
Carlos.