Dynamic input of min/max range of sliders?

unhandled

#1

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:


(Amir Habibi) #2

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 .


(Giulio Piacentino) #3

Have a look if this helps:


#4

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?


#5

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.


Pulling % values from total Square Footage to Equal 100%
(qythium) #6

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


#7

Thank you