DC: SET does not cycle when changing parameter

When in the folowing setup you click on the component the LENX value cycles through the values.

But when you make a change to the parameter with the CURRENT value. For instance


Then clicking will not cycle through to the 50 value.

What is going on here?

PS The 2.54 is to convert from Inches to cm (CURRENT returns an inch value)

current(“LenX”)*2.54 returns 100, current(“LenX”)*2.54-10, returns 90, then its calculated on the next click as 80, since can not find 90, starts again at the first index, then current(“LenX”)*2.54-10, returns 90, the next step…repeat

this is what I find on the sketchup site:

SET(“attribute”, state1, state2, …stateN) The SET functoin sets a given attribute to the next state in a list.

So ‘next state in a list’ means something different?

set(“LenX”, rand()*100,1000)
can never change to 1000
as the “state” keeps changing

Thanks to your explanation of the mechanics of how it evaluates where to go next I found a way to make it ‘behave’ the way I needed. thanks!

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.