Dynamic input of min/max range of sliders?

Is there a way to send inputs into sliders (or equivalent component) so their range is dependent upon a previous computation? I have some sliders with ranges that should be set dynamically based upon upstream computations. The downstream slider ranges don’t make sense after certain upstream calculations.

I saw the ‘expression’ part of the slider, but I’m not sure how to use that yet.

Also, I know Python, in case you have a solution that is easily scriptable?

This looks like a similar question:

2 Likes

I haven’t found such thing though ( tell me as u found it ) in grasshopper , But you could use range component simply and input the range .

Have a look if this helps:

Wouldn’t be enough to use a RemapNumbers components?

You could have a slider with a 0 to 1 range and then use the values from the computation to set the range of a second domain used to remap the slider’s value. Basically the slider would act like a percentage of the interval between two dynamic numbers. Or am I missing something?

Thank you very much! All of these are fine solutions for me.

Technically, I don’t have to update the ranges/domains of the downstream sliders at all. I just thought it would be more accurate to do that, since the ranges/domains are dependant upon upstream inputs. This would be a problem if for example someone new to my project were to start using the downstream sliders, not knowing that the ranges/domains were not accurate due to changes they made in upstream sliders/inputs. So I wanted to reset the ranges/domains of the downstream sliders only after the upstream inputs were changed, that’s all. It makes the file more accurate in my opinion.

Also, @Marco_Traverso , the relationship is not linear, but your suggested solution I’m sure could easily be updated with respect to a function.

There is also a component in Metahopper for doing that, I posted some examples of it in the other thread:

Thank you

Hi, yes I have also used the component “Set slider properties” in Metahopper, that solves this problem with 2 components only, i.e the get and set components. You can then set the domain of the slider dynamically.

1 Like