User-defined attributes
Note: Instead of using the configuration file, you can manage user-defined attributes in System Management > Construction > Welds/Bevels > Weld Attributes.
The syntax for user-defined attributes for weld lines in the Weld Manager configuration file is as follows:
att<x> "<name>" <type> <default> [<values>]
Where:
x – The index of the attribute which needs to be an integer 1...n. The indices must be consecutive integers. For example, if att1, att2 and att4 are defined, att4 will not be recognized because att3 is missing.
name – The name of the attribute. The attribute will be referred to by this name in the Weld Manager interface. If the name contains spaces, enclose it in double quotation marks (").
Note: If you do not start or end the name with double quotation marks ("Att Name 1, for example) or if you use single quotation marks (') for names containing spaces, the attribute will be ignored.
type – The type of attribute: bool, integer, real, string, enum, date, or coded.
default – The options for the default values which can be assigned are as follows:
- bool – true or false
- integer – <integer>
- real – <real>
- string – <string>
- date – now, or a date formatted according to the extended format described in ISO 8601, for example, YYYY-MM-DD, YYYY-MM, or YYYY-MM-DDTHH:MM (2021-05-28T09:00)
- coded – one of the specified integer indexes in the values array
- enum – a zero based index related to the values in the values array
values – A list of strings defining the possible values for the attribute. For type coded, the index number is specified preceding each value in the array (1 "A" 2 "B" 4 "C" 8 "D", for example); you can define the numbers for each value as you prefer and you do not need to follow a specific order.
Important: If the values for types coded and enum contain spaces, make sure to enclose them in double quotation marks ("). Single quotation marks (') are not supported.
Here is an example of the attributes in the configuration file, and the resulting values shown in Weld Manager:
att1 "Insp. Cat" enum 0 "IA-1" "IA-2" "IA-3"
att2 "Welder's ID" string "Enter ID"
att3 "Date Welded" date now
att4 "Remarks" string "No Remarks"
att5 "State" enum 1 "Active" "Inactive"
att6 "JointConfig" string "JointConfig"
att7 "JointDetail" integer 1000
att8 "Field Joint" bool true
Note: For att1, the 0 indicates that the default value is the first value (IA-1). A value of 1 would indicate the default value to be the second value (IA-2), and a value of 2 would indicate the default value to be the third value (IA-3).
All attribute definitions are validated when reading the configuration file. If there are errors in the definitions, a warning is issued and the attribute is ignored. If attributes read from a configuration file contain errors, they are handled in System Management as follows:
- When the default value for type bool has not been set, it is forced to true.
- When an attribute has an unknown type, it is forced to string, and any values in the definition after the default are ignored.
An error message will also be shown explaining how the system has handled the configuration file errors. For more information on managing the attributes via System Management, see Weld Attributes.