format string

format string

The format string module allows you to construct a complex string (for use in titles or as file names) using multiple string and numeric inputs. An expression determines the content of the output. The expression is treated as a Python f-string which allows for the use of variables with Python expressions and format specifiers (for example, {N1:.2f}). Date values are formatted using the Date Format string (default %m/%d/%Y %I:%M:%S %p).

Ports

DirectionNameTypeDescription
InputNumber 1NumberA value to use as a variable.
InputNumber 2NumberA value to use as a variable.
InputNumber 3NumberA value to use as a variable.
InputNumber 4NumberA value to use as a variable.
InputNumber 5NumberA value to use as a variable.
InputNumber 6NumberA value to use as a variable.
InputString 1StringA string to use as a variable.
InputString 2StringA string to use as a variable.
InputString 3StringA string to use as a variable.
InputString 4StringA string to use as a variable.
InputDateDateThe date to use as an input.
OutputResult StringStringA string created by solving the module expression.

Properties

PropertyTypeDescription
ExpressionExpressionControls the sequence of variables used to create the output string. Supports the variables {N1} through {N6}, {S1} through {S4}, and {Date}.
Date FormatStringControls how Date values will be displayed in the output string.

Variables

PropertyTypeDescription
N1DoubleA double value that can be used as the variable {N1} in the expression.
N2DoubleA double value that can be used as the variable {N2} in the expression.
N3DoubleA double value that can be used as the variable {N3} in the expression.
N4DoubleA double value that can be used as the variable {N4} in the expression.
N5DoubleA double value that can be used as the variable {N5} in the expression.
N6DoubleA double value that can be used as the variable {N6} in the expression.
S1StringA string value that can be used as the variable {S1} in the expression.
S2StringA string value that can be used as the variable {S2} in the expression.
S3StringA string value that can be used as the variable {S3} in the expression.
S4StringA string value that can be used as the variable {S4} in the expression.
DateDateA date value that can be used as the variable {Date} in the expression.

Output

PropertyTypeDescription
ResultStringThe output string created by resolving the Expression. This field is read-only.