Custom drop down option to change numeric values

Hello all,

I was wondering if there’s any way to do something like this:
Let’s say I have a curve, I want to offset it and then move it up on Z in a specified distance. In my first option as you see it’s 5 offset and 2 on Z.

But then I would like another option, where offset is 10 and Z movement is 3.

If I call the first option A1 and the second A2, it would be great to have a drop-down menu where I can choose A1 or A2, and it would change the value in the sliders based on the selection. It could also be that I plug in those panels somewhere and that influences the value of the distances. This is so that I don’t script the same components twice, or have two plug in different numbers every time I have to move back and forth between the options. Any way to do this?

script:
dropdownoptions.gh (6.3 KB)

Thank you!
Renan

What you need are Value List and Stream Filter?


dropdownoptions_re.gh (9.1 KB)

2 Likes

This works, thank you so much again for your help!