Is it possible from an external python script to enable the grasshopper solver, open a gh document, but hide the window so all you see is rhino with the results of the grasshopper network?
grasshopper player is similar to what you are asking for
Hello, I tried out grasshopper player, and ran into an issue that might be with some of my assumptions. Previously since the grasshopper window was open, I was able to query the open document, and get the components in the document. When using grasshopper player there isn’t an open document, so I am not totally sure how to get which components are accessible.
I currently am querying components by name, so I don’t need to know the guids to hook them into a UI, but maybe that isn’t the recommended workflow. If you can advise on recommended path to connect a grasshopper network that is run via the grasshopper player to a UI that would be great.
Thank you!
Currently I am getting a specific component via
server = Grasshopper.GH_InstanceServer.DocumentServer
objects = server[0].Objects
# components
for obj in objects:
attr = obj.Attributes
if name in attr.PathName:
return obj
You might want to check out this thread:
I’ve made some progress in launching GH headless from a python script and controlling the GH definition using HumanUI.