Grasshopper

algorithmic modeling for Rhino

Hello,

I've been searching for a way to control the increments in which a slider moves. Say I want the min=0 and max=20 and the slider to increase in increments of 4, is there a simple way to do this?

 

cheers

Views: 1522

Replies to This Discussion

put x*4 in Expression of the slider

 

-j

It doesn't seem to work, I get the error that it's an unknown variable.

not the Expression by right-click. 

Double click on the slider, you will find the Expression and put x*4 there, then make sure it is a integer type.

 

Hi Drew,

 

until recently Sliders used their name in the expression. So if you didn't specifically rename the slider then the expression would be:

 

Slider * 4

 

In more recent version I started using x as a variable, though for the time being the name also still works, just to maintain legacy support.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks for the replies guys, I was still using 8.0006 and this feature was not yet available (and now I will be sure to update!).

how would you do a slider that you only want 0 or 1.0625?

thanks

Expression = x*1.0625

Rounding = N

Min = 0

Max = 1

thanks again Danny!

ryan

If you only allow for 2 values, I suggest using a Value List instead of a slider.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service