Sorry if my question was not clear. The correct path was not the problem.
I meant there is a ‘RhinoApp.Runscript’ statement inside the C# script, which fails to execute when the script is run from a macro. Like in the simplified example script below.
So I repeat my question, how could I assign this C# script to a toolbar button ?
using System;
using System.Diagnostics;
using Rhino;
int radius = 100;
bool sts = Rhino.RhinoApp.RunScript($“-Circle 0,0,0 {radius}”, true);
if (sts)
RhinoDoc.ActiveDoc.Views.Redraw();
This bug report applies to Python 3 scripts, also.
Calls to RhinoApp.Runscript work when run from the IDE, but fail when the same script is run from the command line.
This applies to Python 3 , Rhino 8.3 running on Windows computer.
If the echo parameter for RhinoApp.Runscript function is set to True the code will echo the script component’s text to the command line but the Function itself returns False and fails to execute.
RhinoApp.Runscript functions seem to work fine in IronPython when running them using RunPythonScript in Rhino 8.3.
Hi, I have Version 8 SR17 and I have the same problem. The script runs fine from the editor ‘play button’, but !-_ScriptEditor _Run "path\to\my\script.cs" prints ‘Compile Error’.
Hi @eirannejad.
Nothing! That’s the point! This script below works when I press the play button, but fails if I try to launch it from the command line.
using System;
using Rhino;
Console.WriteLine("Testing CS");
Okay one quick last check. Would you mind testing this in 8.18 SRC as well? Just want to make sure the issue is persisting. Asking since it works for me here: