UnitGroups
The UnitGroups
property is a list of unit group objects. The name of each object can be used as the UnitGroup attribute for the InputBox control.
Each unit group object should have below explained properties.
- Mandatory properties:
Units
: list of unit objects.SystemUnit
: Id of the unit that acts as the default system unit for the unit group.DisplayUnit
: Id of the unit that acts as the default display unit for the unit group.- Optional properties:
LocalizedKey
: User can add localized keys to newly added unit group, the key can be a localized symbol in the project.LinkedDependentGroups
: This is an array of unit groups that are linked to this unit group and follow this unit groups changes. Every unit group listed in the list must have this unit group identifier mentioned asLinkedSourceGroup
property.
LinkedSourceGroup
: This is group identifier marks the unit group that is watched for changes, any changes in configuration of theLinkedSourceGroup will be followed by this group.
Any unit group can have only either of LinkedDependentGroups or LinkedSourceGroup property. |
For example, Length and Velocity UnitGroups are shown below.
"UnitGroups": [
{
"Length": {
"DisplayUnit": "Unit_Length_mm",
"SystemUnit": "Unit_Length_mm",
"LinkedDependentGroups": [
"Velocity",
"Acceleration",
"Jerk"
],
"Units": [
{
"Unit_Id": "Unit_Length_mm",
"UnitText": "mm"
},
{
"Unit_Id": "Unit_Length_inch",
"UnitText": "in"
}
]
}
},
{
"Velocity": {
"DisplayUnit": "Unit_Velocity_mm_s",
"LinkedSourceGroup": "Length",
"SystemUnit": "Unit_Velocity_mm_s",
"Units": [
{
"LinkedSourceUnit": "Unit_Length_mm",
"Unit_Id": "Unit_Velocity_mm_s",
"UnitText": "mm/s"
},
{
"LinkedSourceUnit": "Unit_Length_inch",
"Unit_Id": "Unit_Velocity_in_s",
"UnitText": "in/s"
}
]
}
},
}]
Each unit object in the units list should have the properties listed below:
- Mandatory properties:
Unit_Id
: Unique ID of the unit.UnitText
: Text to be displayed on the screen when that unit is set as the display unit of its group.- Optional properties:
LinkedSourceUnit:
This property gives the unit id of the LinkedSourceGroup, that is linked to this unit. For more detail use of units and unit groups linking, please check the Linking of Units.