a.lalovic

Setting a slider value from within the code

Discussion created by a.lalovic on Jul 16, 2013
Latest reply on Jul 19, 2013 by a.lalovic
I would like to set the slider value from within the code but then still be able to modify the slider/attribute value manualy affterwards?

Lets say that i have a generic rule which defines several building typologyes. If every typology has a different number of floors i would normaly set the "number_of_floors" attribute within the typology definition to a certain valuey using "set" comand and then extrude.




attr number_of_floors  = 0

Building_type_1 -->

set(number_of_floors, 5)
extrude (floor_height*number_of_floors)
...

Building_type_2 -->

set(number_of_floors, 3)
extrude (floor_height*number_of_floors)
...





This should be just a starting point, showing the defalut settup (default number of floors/height) which you should be able to manually edit using parameters afterwards. But in this case the "number_of_floors" attribute gets assigned a certain value within the code and is not possible to edit it with the slider anymore, ie. the modifying the slider values dont affect the model generation anymore. Is there a way just the set, lets say "user" attribute value and not "rule" value?

Outcomes