How to set an checkbox list from data first, and after update the list for changes and give info back to GH?

Hi,

I am trying to make checkboxes to be automaticly checked from data out of GH, example: there are 4 lines in a row. The checkboxes show the 4 boxes checked, cause there are 4 lines. But i want to change the boxes so the lines are getting removed or visable with stream filter. But when i try to set the changed boxes to the lines, it doesnt work. It goes very slow and it keeps refreshing the checkboxes.

Example:

x
x
x
x

These are the checkboxes filled in automatic by the SetCheckbox component from data out of GH. Now i want to change them live, so GH will disable/remove the line while doing it live and gets the data back to GH for the changes.

Is there any possibility to fix this in an other way?

Regards,

Giorgio

I’m not totally clear on what you’re trying to do. Can you post an example file?

Here is an example file. So what i want is this. Now it reads if the lines are true and false so it checks the box automaticly. Those boxes needs to function as a grid. So i want to get the list of active lines and thats working now, but i want a live updateable checkbox so when i check the boxes on and off, the lines are dissapearing and appearing as requested. I have tried to do that but then the window will freeze or goes versy slow because its refreshing its self the whole time.

I had this message which is the perfect problem description:

  1. In general, it’s not a good idea to drive the creation of
    elements with the results of a value listener. Instead, use
    the value listener to drive a “Set” operation, from the
    UI Output tab, to update the contents of an existing element
    in the window. Otherwise, every time something in the window
    changes, triggering your value listener, the entire window needs
    to be re-generated. This can create the appearance of a “freezing”
    behavior. See the example files for more information on the appropriate
    configuration of “Create” and “Set” components in Human UI.

But the thing is i dont know how i should do it otherwise.

Test set and get.gh (10.5 KB)

I found the solution. I made an wrong set and get connection. It works now!

Test set and get.gh (18.7 KB)

1 Like