Single click trigger (like a button)

I’m looking for a component that when clicked sends a value downstream. A button can’t be used because it send a true value followed by a false value at relase. The boolean toggle is unintuitive.

So basically I want a button that just forces the component to recalculate. For all I care it can generate whatever value it want - I just need it to trigger only once.

The reason is that I have a lot of completely independent processes in my grasshopper script that I need to be able to trigger. They need to not be on of off - they need to be triggered.

I have looked at the thread Single click button solved? - Grasshopper - McNeel Forum which didn’t really cover my question exactly. I basically look for a trigger, like the trigger component, but just as a button that allows me to do the triggering manually. Any advice?

I’m aware that the trigger can actually do exactly this, but I want to be able to control it from the Remote panel

Hello,

There is an Expire Object component in Metahopper that can be himself triggered with a button.
You could use it to recompute one or several components of each of your independent sections.

ExpireObject.gh (5.7 KB)

1 Like

Ah yes, that old thread keeps coming back :wink:

I might be misunderstanding the case, but couldn’t one indeed use a Toggle, publish it to RCP (where it will be single click), and wire it up to whatever needs triggering:


221209_ToggleRCP_00.gh (4.7 KB)

Edit: Another solution might be to expire a specific component by name/guid remotely, as discussed here:

Thanks Anders. The toogle is quite a natural solution but it just seems so wrong and unintuitive. It’s not a nice workaround.

So I have been using Human UI and here there is a True-Only button that has solved my issue for now.

Indeed, the long standing “double click Toggle” and “Button expires twice” issues continue to affect my daily Grasshopper as well.

Nice, wasn’t familiar with that one. Just in case you missed it though, one can also set the vanilla Button to only output True (or anything else), it’ll still expire twice though:

3 Likes

How about a ValueList with Cycle option ? Requires a single click and the value is persistent.

imageimage

SwitchOnOff.gh (2.8 KB)

1 Like

Indeed, that’s one of the workarounds from the original thread on the old forum, brought up here:

You can’t publish those to the RCP though :man_shrugging:

2 Likes

Here is my way to do it and still using the button is to combine it with Data Recorder, in this case you will always get a “True” outcome and pushes the definition downstream to re-calculate.

Animation

2 Likes

The double expiration keeps causing me problems, so in that case the toggle is a lot better.
I user HumanUI rather than RCP so the true only button will be my solution for now (it only expires once). It just baffles me that there is no real ‘trigger’-button in grasshopper.

1 Like

One can also set both button states to True (or any primitive datatype), as per this post above.

1 Like

Just learned something new, thank you

1 Like

Pancake has a trueonly button you may use.

I may have found a solution that doesn’t rely on humanUI and combines Anders input to another post about time triggering. This way I can force a single trigger of data. Like a remote controlled data dam that only react once on a true value

Pancake’s true-only button. But it won’t work with Data Recorder though.

Guys, I wonder why not one use the True only functionality mentioned by @AndersDeleuran

2 Likes

Hehe, I did sense that was related. Now you just need to script out the third party components downstream and it’s Christmas time :partying_face:

1 Like

But the button would still trigger 2 recomputations.

3 Likes

How about this? I get “one computation per click”. in military they call it " Semi-Automatic"
Screencap_V8

1 Like

Hi,
A bit of c# would help.
The c# input named “target” is used to find all objects with that name and expire their solution when input value is true.

It may need refining.

image

button trigger high only.gh (10.2 KB)

Regards

1 Like

Hi, shorter edit