Human UI: Single button for all the inputs

Hi all,

First of all, thank you @andheum for the amazing tools you have created.
I am trying to create a daylighting automation tool for LEED compliance using Ladybug tools and Human UI. As of now for each of the inputs I am having a separate update button. Each time I click the button it is taking some time to create the geometry and as a result it is taking really long time to perform the analysis. What I would like to have is giving all the inputs once and then just one update button to take all the data to value listener. Is there any work around to do it or some how I can tackle the lagging issue with human UI

I recall that many Ladybug components have this run toggle
You can set these TextBox inputs to live read instead of button update
At the end make a button/toggle for Ladybug to run

1 Like

There’s a pattern for these situations that I like. The value listener on your text inputs is set to “manual input” (disable “Live” in the right-click menu) and triggered with a “live” value listener on an update button (Should probably be a “true only button” so it only fires once per click). It’s easier shown than described:

commit-button.gh (10.0 KB)

This makes so much sense
Perhaps a case where using the ZUI isn’t the most effective…I’ve always wondered what a not live value listen is for. Been missing that T the whole time…

I don’t disagree… it’s a bit hidden as an “advanced” feature - developing it that way also meant that old definitions were compatible w the new components rather than having to do the whole “upgrader” thing… but that’s mostly just developer laziness :stuck_out_tongue:

1 Like

Thanks a lot for the insights. These features would solve many of the problems I had been facing.

Andrew could you tell me how this variable parameter can be added via code?
I’ve copied CanInsertParameter, CanRemoveParamter, CreateParameter, DestroyParameter, and VariableParameterMaintenance into my component. Not working…

Your class must implement IGH_VariableParameterComponent, search the forum or see my source (https://bitbucket.org/andheum/humanui/src/c679022a34c18cd0b421025fcbf45861e3c757dd/HumanUI/HumanUI/Components/UI%20Main/ValueListener_Component.cs?at=master&fileviewer=file-view-default) for details

thank you much for pointing that out!
it’s working!

1 Like

Hi Andrew

What if there is no text inputs and you just want a recompute button? I’ve tried a few ways but none seem correct:

  • Option 1: True-only button will only update once. Any other times the recompute button is pressed it will not change the value and therefore will not update downstream.

  • Option 2: A button will actually update twice (true and then false) so will re-run stuff downstream twice.

  • Option 3: A toggle seems to work but is not graphically great IMO.

Is there another way to do what I am after?

Thanks

acc77bb4c31d75ea59f414c9f4de6cfe5de09d77.gh (16.9 KB)

the “true only” button should pass a new “true” every time you click it - it’s not correct that it updates only the first time. That is what it’s for - it only expires the value listener once per click. If you want it to alternate between false and true on each click, either use the toggle, a checkbox, or true-only button => value recorder => mass addition => modulo 2

Thanks Andrew for the clarification.

So is there a way to “see” that the True Only button has updated? Because with a panel attached it will always just say “true”.

you could use a recorder component ¯\_(ツ)_/¯