hello everyone … I am a beginner in using Grasshopper …
I want to ask something related to my python script block function problem …
I made the function block as follows:
my goal is to calculate the value at input y. The value on input y will be added 1 per program cycle (x).
when i press the x button (activate counter) then the program runs adds y value. The result of adding the value is then issued to the output variable (a).
the problem is if you deactivate the toogle counter button, the output a will be “null” again. Is there a way so that when I deactivate the counter button the variable a still has the same value as the result of the last sum (it doesn’t change to “null” again)
here is my code :
import rhinoscriptsyntax as rs
for t in range(x):
y = y + 1
a = y
is someone can help me?