ClassID Mapping
- Last UpdatedMay 12, 2025
- 2 minute read
ClassID Mapping, also known as Classification, determines the class assigned to the object in the output. Each mapping entry in the configuration is examined in turn and the first matching entry is used to generate the object’s Class ID.
The simplest form of ClassID map entry to derive ClassID for an object is shown below:
<Object>
...
<Conditions>
<Attribute name="object_class" pattern="Door" />
</Conditions>
<ClassID value="[object_class]">
</ClassID>
...
</Object>
Note: Conditions may hold multiple attribute elements. All conditions must be met for the mapping to be applied.
Lookups may be used to obtain the Class ID from an external data source.
<Object>
...
<Conditions>
<Attribute name="object_class" pattern="Door" />
<Attribute name="Name" pattern="Door 100X40" />
</Conditions>
<ClassID value="[object_class]">
<Lookup id="ExcelLookup" >
<FailAction action = "Fixedvalue" value="UNKNOWN" />
</Lookup>
</ClassID>
...
</Object>
In this case, the value of the object_class attribute is used as a key to look up a value for the ClassID. If no match is found, value is derived from its fail action.
You can use Transforms to modify the value of an attribute, as shown below:
<Object>
...
<Conditions>
<Attribute name="object_class" pattern="Door" />
<Attribute name="Name" pattern="Door 100X40" />
</Conditions>
<ClassID value="[object_class]">
<Transforms>
<Remove pattern="^[A-Za-z0-9]{3}" />
</Transforms>
</ClassID>
...
</Object>
Use attributes from associated objects to modify the value of ClassID as shown below:
<Object>
...
<IncludeAssociatedObjectAttributes type = "^FillsVoids$" refID = "[ClassName]"
>
<Conditions>
<Attribute name = "ClassName" pattern = "^OPENINGELEMENT" />
<Attribute name = "Name" pattern = "^element1$" />
</Conditions>
</IncludeAssociatedObjectAttributes>
<ClassID value="[ClassName]_[associated:ClassName]" />
...
</Object>
In the above example, the value of the ClassName attribute along with the value of ClassName of the first associated object matching the condition is used in deriving ClassID.
Notes:
-
The prefix "associated:" is used when referring to the associated object's attribute.
-
All conditions must be met for the ClassID mapping to be applied.
If an object does not match any of the mapping entries, it is assigned a class ID of UNKNOWN.
You can use the following mapping to create an object where all tags similar to V-101 are created with a ClassID of VESSEL:
<Object>
...
<Conditions>
<Attribute name = "block name" pattern="V-\d{3}" />
</Conditions>
<ObjectID value = "[block name]" />
<ClassID value="VESSEL" />
...
</Object>