Manipulating Value Lists

Hi everybody,

I’m looking into a possibility to either create keys and values for a value list or manipulate an existing list.

Im creating a parametric script which should be usable without extensive grasshopper knowledge and therefore I have to handle a lot of possible user input and make changing things as easy as possible.

The idea is, to give the user a possibility to select certain elements from a value list which should be (not) included in a karamba fem calclulation. Since the model is parametric, I cant know how many elements are needed beforehand, so idealy I would manipulate a list to do that where every item is selectable and a single list entry which can either be 0 or 1.

I had hoped this is as easy as changing slider values with metahopper and there is a component I could use but so far I havent found a possibility at all. If scripting is involved, I would need somebody to give me a little nudge on how to do that (I’m fine with just a link for a python/c# ressource but I’m unsure where to start looking and my scripting skills are kinda basic). If it’s not possible I have to think of something else. Thanks in advance!

Edit: I should clarify that the question is not about picking the correct value from an existing list but about creating keys and values in a list.

Have you tried ItemSelector component from Human plugin?

I’m not quite sure how I should work with the ItemSelector component in this case. In my understanding, the itemselector returns the values which are selected in the connected list. How do I use it to change the the value list itself?

I should clarify that the question is not about picking the correct value from an existing list but about creating keys and values in a list.

grafik

If I would solve my problem manually I would edit the list and add for example Element 7, Element 8, Element 9 etc in case my model is bigger. Or delete Element 6 and 5 in case my model is smaller. So the user could pick any element whichactually exists within the model.


ItemSelector.gh (20.8 KB)
2 Likes

Thats brilliant, thank you very much. Looks promising, I will try to implement that. :slight_smile: