Dynamic Components OnClick Function Examples
OnClick FunctionsFunctionDescriptionExample(s)ALERT("message")The ALERT function displays the value of the message in an alert box.Example: =ALERT("You Clicked Me!")
Last updated 17 July 2026
OnClick Functions
Function | Description | Example(s) |
|---|---|---|
ALERT("message") | The ALERT function displays the value of the message in an alert box. | Example: |
ANIMATE(attribute, state1, state2, ... stateN) | The ANIMATE function starts an animation that will change the value of the attribute to the next value in a list of parameters every half a second. For example,if the ONCLICK attribute contains ANIMATE("X",0,100), and the user clicks on the component, the component would animate the value of the "X" attribute between 0 and 100. A subsequent click would animate back to 0 from 100. If more than two animate states are passed, then the value will toggle between them in order. So, if the ONCLICK attribute equals ANIMATE("ROTZ",0,-130,10,100) the animation would go through each of the 4 values with each click. | |
ANIMATESLOW(attribute, state1, state2, ... stateN) | The ANIMATESLOW function does the same thing as animate, but slower (one second). | |
ANIMATEFAST(attribute, state1, state2, ... stateN) | The ANIMATEFAST function does the same thing as animate, but faster (a quarter of a second). | |
ANIMATECUSTOM("attribute", time, easein, easeout, state1, ...stateN) | The ANIMATECUSTOM function does the same thing as animate, but with over an arbitrary time with easing. Refer to the ANIMATE function for information about easing. | |
GOTOSCENE("sceneName," time, easein, easeout) | The GOTOSCENE function moves to a scene identified by a name or number. Refer to the ANIMATE function for information about easing. | |
REDRAW() | The REDRAW function redraws the component that contains this function. | |
SET("attribute", state1, state2, ...stateN) | The SET functoin sets a given attribute to the next state in a list. |
Still need help?
Technical support from our New Zealand team is available to customers with a current Procadsys SketchUp Pro Plus or SketchUp Studio Plus subscription. Self-help articles are public.
Contact SketchUp support