Hi,
Using the Fly_ID component i’ve noticed that when a connected slider has and expression in it, the value taken is not what the slider shows but some kind of rounded one. Like so:
Hi @mingbo ,
This is weird. Now it is working.
I start t suspect it is related to the sliders in R8. They don’t necessarily comply with the settings. For instance, on some cases you ask for 2 decimal numbers and it gives you 3 instead. It doesn’t round the number, as you do in Fly and instead it gives you more decimals than asked.:
Hi @mingbo ,
Sorry to bring this back again a year after.
The extended issue here is as follows: Say that i want a slider to give me values as 0.2, 0.4, 0.6, … only!
Solving this with a slider I set the range from 1 to N and the expression to x*0.2 … but here is the issue:
Since I want only to have the above values [for instance] I set the the slider accuracy to integer [N]. By doing so the values output in the Fly_ID are 1, 2, 3, …
Setting the slider accuracy to float [R] yields the output values to 0.2, 0.21, 0.22, 0.23, and so on.
Neither of those gives the desired output.
The question is if there i a way to get the values I need using sliders? Should I use as the only option a panel?
Thanks,
-A.
Ok, I am able to sort out the issue. It seems a bug in the NumberSlider’ CurrentValue of Grasshopper’s SDK when output value is set to integer [N] with an expression. But I am able to find a walkaround solution for this case.
The new update will be in the next release.