About script expressions
A script expression is a JavaScript program that
gets evaluated in the context of a job (file or jobfolder) to determine the value of a
particular property of a flow element or connection. This allows the property value to depend
on the job or its associated metadata.
Note that you need an active license for the
Scripting Module in order to configure and use this type of variable.
Length/Unit
When you select "Length" as the value type for this variable, an additional dropdown menu
called Unit appears, allowing you to choose the appropriate measuring
unit.
Note: Make sure to use the same unit in the Variable Value text box below. Otherwise, the
chosen value from the Unit list will be ignored. For example, if you
choose "Centimeters" in the Unit dropdown and enter "20 mm" in the
Variable Value text box, then Smart Preflight will consider
millimeter as the unit and centimeter will be ignored.
How to proceed
To define a variable using a script expression, do one of the following:
- Type the JavaScript source code in the Variable Value box and click
Save to save the code to a file.
- Click Open and select an existing script (*.js). The content of
the selected script will be shown in the Variable Value box. If you make any changes,
makes sure to save them to a file (Save/Save
as).