I have been using GH Python Remote for automation of design & analysis (CFD) task using Python and Grasshopper. Recently, I got a new machine and installed last GH Python Remote version and tried to run my scripts, but got the follwing message in Rhino terminal:
Command: -_RunPythonScript
Python Script ( ResetEngine ): "C:\ProgramData\Anaconda2\Lib\site-packages\ghpythonremote\ghcompservice.py"
Command: 55317
Unknown command: 55317
The command number seems to change everytime I run the script.
This is my python script where I call a user object:
import ghpythonremote
from ghpythonremote.connectors import PythonToGrasshopperRemote
...
def export_geometry(x1, x2, x3, x4, x5, x6, x7, x8, x9):
with PythonToGrasshopperRemote(
None, r"C:\ProgramData\Anaconda2\Lib\site-packages\ghpythonremote\ghcompservice.py", rhino_ver=7, timeout=500
) as py2gh:
rghuo = py2gh.gh_remote_userobjects
export = rghuo.userobject(x1, x2, x3, x4, x5, x6, x7, x8, x9)
output_text = str(export[0])
output_geo = open(r"control.stl", "w")
output_geol.write(output_text)
output_geo.close()
if __name__=="__main__":
export_geometry(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9)
Which follow methodology as describe here:
What is the problem here?