Dear community,
To load and run PYTHON scripts from C#.
I already found the RunPythonScript command, and was able to run a standalone script with filename “externalscript” from C# like:
if (!Rhino.RhinoApp.RunScript("-RunPythonScript " + externalScript, echoScriptCommand))
{
MessageBox.Show("ERROR: Loadscript FAILED!", "ModelSeatPanel", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
My questions:
- how can I pass arguments to this script (coming from my C# environment)?
- what is still in the engine/interpreter after running a script? Is it possible e.g. when clicking a button to run a function from a script, have the results like in global variables or somewhere else and then click another button to run another script that uses these variables?
Kind regards,
Filip