Token Default Value
The Tokens can specify a default value, such that if AseptSoft could not find a value for one of them, it will know to provide a default value that can be static or incremental.
The default value comes in handy for cases where the user did not provide a correct value for all the blocks of a class:
In the example above, the normal token would have been: $$text(VP-)$$. However, we would see that this is not enough. As for the two valves that don’t have a tag specified, the final value would be “?”.
The default value of a tag can be static or incremental
Static Default Value
Use the Default value expander in the Token Builder window, chose the “Fixed”, and provide with a value. You will see the resulted token will update from $$text(VP-)$$. to: $$text(VP-)or(REPLACEMENT VALUE)$$ This means, when AseptSoft will not find a text that contains “VP-” to use it for the token, it will return “REPLACEMENT VALUE”
Incremental Default Value
As for Tags that are missing we don’t want repetition, we need AseptSoft to provide a new value for every token that is not resolved, to preserve the unicity of the Tags.
An incremental default value requires more data:
Prefix - is the part that doesn’t change, and comes before the autoincremental part
Autoincrement bigger than - is the smallest number permitted. If set to 10, the increment will begin from 11, 12, 13, etc
Autoincrement min number of digits - requires padding with '0' to reach the minimum number of digits. A value of 3 would make the number 10 be shows as 010.
Autoincrement must match regex - a regex pattern that if not matched, AseptSoft will keep incrementing until it finally matches the pattern.
Autoincrement must be higher than all existing tags - if checked, if in the P&ID the smallest tag is “HA-113”, AseptSoft will not generate “HA-100”, even if it’s not used already. A value of “(0|2|4|6|8)$” will only allow even numbers to be generated.
Suffix - just like the prefix, a fixed part that comes after the incremental part.
Example:
The token $$text(VP-)or(VP-\d{3,10,##(0|2|4|6|8)$##})$$ will generate the following possible increments:
VP-010
VP-011
VP-012
VP-013
…
The incremental generator will NEVER cause duplication in the final value of any Property. So the generated tags will be always different from the existing ones.