GHPython: How to check if an attached Timer is running?

python

(P1r4t3b0y) #1

Hi,

Is it possible for a GHPython component to check, if a hooked up Timer is currently running/recomputing the component itself, or not?

If so, would it also be possible to keep track, at which refresh iteration the component currently is?

Thanks.


#2

It probably would be (by iterating the canvas components etc), but I suspect a simpler solution is to implement your own “timer” within the GHPython code itself. Here’s a basic example:

181207_GHPython_DynamicCounter_00.gh (3.2 KB)


(P1r4t3b0y) #3

Wow, very nice! Thank you, @AndersDeleuran. :smiley: