As with previous examples, the attitude towards Enums with regard to inter-schema relations is the same. For each enumerated list defined in the Tool schema there exists an enumerated list in the SmartPlant Schema. The relation is known as MapEnumListToEnumList, if the direction is from the Tool's Map to the SmartPlant Schema, or EnumListToMapEnumList, if the direction is from the SmartPlant Schema to the Tool Map.
The handling of a property with a data type of Enumeration / UOM is carried out in the adapter in the following manner:
-
A new property object is created based on the current property’s name.
-
If it is not empty, then its data is saved in the value attribute of the property.
-
If the property is identified as belonging to a specific hard-coded list of UOMs, then a certain flag is set to True. Later, this flag is checked and if its value is True, then a UOM value attribute of the property is set.
-
If the property is empty then it is checked for enumeration. If it is an Enum, then a flag designating this is set to True.
The properties and relations for a MapEnumList can be viewed in the Edit Enumerated List Definition dialog box.
General Definitions
Property |
Remark |
---|---|
UID |
The UID should be a unique name. |
Name |
The name of the Intergraph Smart Instrumentation enum list. |
Tool Schema Relationships
Relationship |
Remark |
---|---|
Scoped map properties |
A MapEnumList must be related to the MapProperties that it scopes. |
Contains |
A MapEnumList can contain a variable number of MapEnum objects. |