Set boolean to false when running script

Hi, I am trying to set a specific boolean toggle to false upon opening a grasshopper script which has the toggle initially set to true.

I have written a c# scripting component that successfully finds the correct boolean toggle by name and sets it to false. The issue is, this occurs after a read on the initial toggle value and the unwanted result is the grasshopper script completes execution with a true value and then switches to false afterwards

Any suggestions or pointers would be very helpful towards behavior that essentially automatically toggles a specific toggle to false at the beginning of a run

Have you tried setting the draw order of your scripting component to be behind all other components (Menu: Edit → Arrange → Put To Back)?

This should make grasshopper calculate it before the other components on the canvas.

-Kevin

1 Like