Text Groups Configuration
The JSON file can also contain the text groups definition. In this case, the text groups will be created before the object models are created and configured.
To define the text groups and their elements, the JSON file must contain an element (property) named TGSData with an element named TGS that is a list of the text groups.
Example
{
"DPTData": {
"DPTS": [ ...<list of DPTs description>... ]
},
"REFS": {
"DPTS": [ ...<list of Referenced DPTs configuration>... ]
},
"TGSData": {
"TGS": [...<list of text groups configuration>... ]
}
}
For each text group, it is necessary to specify the following:
Text Group Data | ||
Data | Use | Description |
Name | Mandatory | Name of the text group. |
Description | Optional | List of the values used as CNS descriptions of the text group. Each value must contain the following data:
The empty list (“Description”: [ ]) resets the description, while the name of the text group is assumed as default description. |
TGElems | Mandatory | List of texts. |
Each text must contain the following:
Text Data | ||
Data | Use | Description |
Id | Mandatory | Text identifier. |
Text | Mandatory | List of text values. Each value must contain the following data:
|
In case of a re-import, the text groups and the text values are not deleted. It is only possible to add new text values or change the previously imported ones.
Example
{
"DPTData": {
"DPTS": [ ...<list of DPTs description>... ]
},
"REFS": {
"DPTS": [ ...<list of Referenced DPTs configuration>... ]
},
"TGSData": {
"TGS": [
{ "Name": "MyText",
"Description": [ { "Culture": "en-US", "Text": "My Text Group"} ],
"TGElems":[
{ "Id": 1,
"Text": [
{ "Culture": "en-US", "Text": "Text 1" },
{ "Culture": "it-IT", "Text": "Testo 1" }
]
},
{ "Id": 2,
"Text": [
{ "Culture": "en-US", "Text": "Text 2" },
{ "Culture": "it-IT", "Text": "Testo 2" }
]
},
{ "Id": 3,
"Text": [
{ "Culture": "en-US", "Text": "Text 3" },
{ "Culture": "it-IT", "Text": "Testo 3" }
]
}
]
}
]
}
}
The following image shows the corresponding fields in the Text Group Editor tab:
The command macro text group (TxG_CommandMacro) is currently not managed. Consequently, if a JSON file contains this text group, it is ignored during the import process.