- 29 Jan 2024
- Print
- PDF
Expression Converters and Format Masks
- Updated on 29 Jan 2024
- Print
- PDF
Purpose: Practice adding expression converters and format masks to controls.
Task: Add a tag to the canvas, add an expression converter to convert the units, then apply a mask to show one digit of precision.
Steps:
Drag and drop a tag onto the canvas. Take note of the tag’s Units, if available.
On the Animation panel, add an Expression converter.
Enter an Expression to modify the tag’s values. Use the same syntax as creating Expressions in the Script Editor. For basic math, use “IV” for the tag’s value, “+” for addition, “-” for subtraction, “*” for multiplication, and “/” for division.
In the Mask field, use “#” for an unforced digit and “0” for a forced digit. Enter the format mask 0.0 to force one digit after the decimal. Remember to press enter or click away.
Click Run to test.