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)

1 Like

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 ĀÆ\_(惄)_/ĀÆ