Hello, I have a problem dealing with Grasshopper button components and accessing them from a python script to “simulate” a click, by means of the Grasshopper API.
[Context] I have a GH solution consisiting in multiple phases where I have to bake geometries in different layers. Such layers are taken as input by other GH nodes in the pipeline.
I’m writing a python script to test the overall workflow, but I cannot figure out how to “trigger” GH buttons.
I’ve tried to change the bool value of the button component’s
ButtonDown property, but I don’t understand how to “refresh” the solution and generally how the solution pipeline works, that is: do I have to expire the component which I am modifying? do I have to expire the entire solution? how does the solution scheduling works?
I also tried to ignore the button component, and to manually feed the downstream component with a temporary
True value, but again, I do not figure out how to recompute the solution.