Controls > Advanced Controls > Automation in Scriptable Controls > Using Scriptable Controls with API for Calculations
Using Scriptable Controls with API for Calculations
1. Plot a function using the Slider advanced control in 2 ways: Using the slider’s output and using the worksheet's input.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
2. Plot the function.
Click to copy this expression
3. Use the API to update the slider input and modify the function. The following slider calls the Mathcad API. You can copy the example to your worksheet to see the full script.
Click to copy this expression
4. Set an input variable.
Click to copy this expression
* 
After you copy this expression to your worksheet, you must use Input/Output > Assign Inputs to assign x2 as an input variable
5. Compare the results. You can see that both methods provide similar results.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Was this helpful?