Controls > Advanced Controls > Advanced Controls
Advanced Controls
Advanced controls, such as list boxes, sliders, and buttons, allow you or other users of your PTC Mathcad Prime documents to enter information other than by defining a variable. This is particularly useful if you want to streamline a repetitious process. A set of controls allows you to identify and quickly specify control parameters in a calculation and, in some cases, limit the available input choices. There are six types of controls:
Button
Radio Button
List Box
Checkbox
Text Box
Slider
Here are a few examples of how controls might be used:
Use a push button, checkbox, or radio button to set a binary state (yes or no, true or false, on or off).
Use a list box to allow the end user to choose from a variety of materials, which in turn selects properties from a table.
Use a radio button to create a numerically-based quiz.
Adding Advanced controls
You must use a blank area on your worksheet to create the advanced control. Here are two methods for creating controls:
a. Click Input/Output > Advanced. A drop down menu appears. Select the required advanced control.
b. The definition operator is inserted automatically as part of the control. Add the name of the output variable on the left side of the definition operator.
a. On your worksheet, type the name of your control.
b. Add the definition operator.
c. Click Input/Output > Advanced. A drop down menu appears. Select the required advanced control.
Some controls can be used with little or no modification, such as a simple button that assigns a value of 1 or 0 to a variable. Other controls require additional scripting to be useful. PTC Mathcad Prime scriptable controls support VBScript and JScript ES3. All controls have scripts written in JScript as a default.
Properties and methods of the control having to do with values and items held by the control are accessible through the script.
* 
Microsoft corporation announced its plan to deprecate VBScript in the future. Therefore, we recommend writing all new scriptable controls in JScript, and converting existing VBScript controls to JScript.
Was this helpful?