I am currently opening Rhino and running Rhino command lines using subprocess.call()
in an external python script.
rhinoPath = "C:\\Program Files (x86)\\Rhinoceros 5\\System\\Rhino4.exe"
rhinoCommandFilePath = "Z:\\Arkangus\\2019\\RhinoCommand.txt"
scriptCall = "_-ReadCommandFile {0}".format(rhinoCommandFilePath)
callScript = '"{0}" /nosplash /runscript="{1}" /runscript="_-Exit"'.format(rhinoPath, scriptCall)
subprocess.call(callScript)
However, it means opening Rhino everytime I am running the script, and closing it after.
Is there a way to check if Rhino is already open and run the RhinoCommand file directly into Rhino if it is the case?
I am not looking for a pipe between Rhino and Python.
Thank you!