Formatting of placeholders and special functions in the context of conversion

Numeric placeholders such as the {LAYER_SEQ} can be formatted by the user.

On the one hand, you can influence the number format with a ":". {LAYER_SEQ:000}, for example, ensures that the sequence number is always output with three digits (leading zeros if necessary).

In addition, you can define an offset with a "#" if you want to influence the start value.

If you want to define both an offset and a format, the offset comes first and then the format. Example: {LAYER_SEQ#-1:000} (Layer sequence number with offset -1 and a format of three digits, where leading zeros are output. Sequence number 8 is output as "007" in the example.

Special functions [ ], {?..}, |

  • [] defines a block which will be hidden if the placeholder in it is empty. So for example you can use [.{TRUNK_SEQ}] to hide the . if there is nothing in TRUNK_SEQ.
  • The ? works similarly, but does not output the content of the placeholder. So [.{?TRUNK_SEQ}] only prints the . if TRUNK_SEQ contains something - but not the value of TRUNK_SEQ itself.
  • The whole thing is also negated. So [.{?!TRUNK_SEQ}] behaves exactly the other way round. If TRUNK_SEQ does not contain a value, then the .
  • | (vertical line) is an "or" - if the part before the | contains a placeholder that outputs a value, then that part is used. Otherwise, the part after the | is used. The whole thing can be used, for example, to output a default value when a placeholder has no value: Rohr[[.{TRUNK_SEQ}]|-Start]
    • For example, if TRUNK_SEQ has the value 1, then "Pipe.1" is displayed, and if TRUNK_SEQ has no value, then "Pipe-Start" is displayed.
  • With {?TRUNK_SEQ=2} you can also check the value.

Formatting options

Simple formatting rules

Format (formatting chain) Description DescriptionExample
D or d

Output of the value as an integer, the precision specifies the minimum number of digits required.

1234 (D) → 1234

1234 (D6) → 001234

X or x
Output of the value as a hexadecimal value, the precision indicates the minimum number of digits required.

255 (X) → FF

255 (x) → ff

255 (x4) → 00ff

ABC or abc
Output of the numerical value as letters of the alphabet (where a corresponds to the value 1).

2 (ABC) → B

2 (abc) → b

26 (ABC) → Z

27 (ABC) → AA

Custom formatting rule

The custom formatting rules consist of placeholders that can be freely combined to write a corresponding formatting expression.

Platzhalter Beschreibung Beispiel
0

Replaces the digit 0 with a corresponding existing digit if necessary; otherwise the digit 0 is displayed in the result.

1234 (00000) → 01234

#

Replaces the # symbol with a corresponding existing digit if necessary; otherwise, no digit is displayed in the result.

1234 (#####) → 1234

.

Determines the position of the decimal separator in the result string.

1234 (####.0) → 1234,0

,

The character is used both as an identifier for group separators and as an identifier for number scaling. When used as a group separator identifier, a localized separator is inserted between each group. When used as a number scaling identifier, a number is divided by 1000 for each specified character.

Separator:

1234 (##,#) → 1.234

1234567 (#,#) → 1.234.567

 

Scaling:

1234 (#,#,) → 1

1234567 (#,#,) → 1.234

%

Multiplies a number by 100 and inserts a percentage symbol in the result string.

1 (%) → 100%

Multiplies a number by 1000 and inserts a per mil symbol in the result string.

1 () → 1000‰

E0 or E+0 or E-0
Format the result with the exponential notation if it is followed by 0 at least once. E can be written in lower case to write the E in the result in lower case. The + sign indicates that the exponent is always preceded by a sign. A - or no sign indicates that only negative exponents get a sign.

1234 (#0.0e0) → 12,3e2

1234 (0.0E+0) → 1,2E+3