Friday’s Tip – Using Sliders
Sliders let you update a variable value by sliding a bar up and down, even while your simulation is running.
Setting up sliders is easy. From the Insert tab click on the slider button then left click on the simulation window where you want the slider to be placed.
This will show a drop down box where you can select the global variable that the slider should be associated with. Select the slider and then double click it at any time to change the variable associated with it.
The variable value is updated whenever the position of the slider is changed. So if it’s used in a calculation, timing or object property they will start using the new variable value.
If you wish something more complicated in your simulation to change or multiple changes to happen when the slider is moved then you can use the On Button Click Visual Logic event. This event will run whenever the slider value is changed. The special variable BUTTON will contain “Slider:VARNAME” where VARNAME is the name of the global variable associated with the slider.
Sliders are great for when you don’t know the exact value you are looking for as you can change the value easily and see the immediate effects changing that variable has.
They can also help when presenting to others or sharing your simulation as it makes your simulation easy to understand, and easy for those unfamiliar with to change and see the different outcomes.
What types of simulations do you use sliders in?