Execute a treatment only once, and store the results



Is it possible to evaluate a component only at some condition ?

For example I want the VB component to be evaluated only if x (EDIT : the value of the Toggle) is True :


evaluation.gh (4.3 KB)

(Tim Stark) #2

If statement:



No. The component will always be evaluated, even if i put an If statement in it.


Same thing with Metahopper OnOff function


Just a thought that you may be able to achieve this using dispatch component.

(David Rutten) #6

It will always be called if there’s data going in. But you can return immediately if the inputs aren’t to your liking.


Well, my need was to execute a treatment only once, and keep the results.

I found a solution using Metahopper components.

But i get an annoying “GH Breakpoint” error message : “object expired during a solution”.


only once.gh (17.6 KB)


New version, simplier and without GH error message.

only once.gh (13.6 KB)