I’ve built a custom Rhino8 plugin in C#. I want one of the buttons in my plugin to execute the command -_RunPythonScript <my-script>.py` where the python script is a Python3 script. After sleuthing the internet a bit and consulting ChatGPT, I think the solution should be for the button to trigger this command
RhinoApp.Runscript("-_RunPythonScript <my-script>.py", true)
which should be equivalent to running that line in the Rhino command line. However, upon executing this line, I get the error message
Command: -RunPythonScript
Unknown command: -RunPythonScript
I am a bit stuck and wondering why the RunPythonScript is not recognized by RhinoCommon.
Somewhat tangentially related, but this seems to be a similar thread telling me that executing Python from the C# interface is still under development ( Executing Python 3 Script in C# ).