Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Gateway for 2D Data

ObjectID Mapping

  • Last UpdatedMay 12, 2025
  • 3 minute read

Object ID Mapping, also known as Identification, determines the ID assigned to an 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 ObjectID.

When using AutoCAD 2D, MicroStation 2D, or Smart P&ID Extractor, text strings from drawings are stored in attributes named #TEXT#, which can then be used to tag objects.

The simplest form of ObjectID map entry to derive ObjectID for an object is shown below:

<Object>

...
<Conditions>
<Attribute name="object_class" pattern="Door" />
</Conditions>
<ObjectID value="[#TEXT#]">
</ObjectID>

...
</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 objectID from an external data source.

<Object>
...

<Conditions>
<Attribute name="object_class" pattern="Door" />
<Attribute name="Name" pattern="Door 100X40" />
</Conditions>
<ObjectID value="[#TEXT#]">
<Lookup id="ExcelLookup" >
<FailAction action = "DiscardObject" />
</Lookup>
</ObjectID>

...
</Object>

In this case, the value of the "[#TEXT#]" attribute is used as a key to look up a value for the ObjectID. If no match is found, value is derived from its fail action.

Use Transforms to modify the value of an attribute, as shown below:

<Object>
...

<Conditions>
<Attribute name="object_class" pattern="Door" />
</Conditions>
<ObjectID value="[#TEXT#]_[object_name]">

<Transforms>

<Keep pattern="pump-\d{2}[A-Z]" />

<InsertAfter pattern="^.*$" value="InsertAfter" />

<InsertBefore pattern="^.*$" value="InsertBefore " />

</Transforms>

</ObjectID>

...

</Object>

For example, if the initial ObjectID value is "3$pEhtFpv31QFndkpGikoC_this pump-01A is new", the final value after <Transforms> will be "InsertBeforepump-01AInsertAfter".

Attributes from associated objects can also be used to modify the value of ObjectID, as shown below:

<Object>

...

<IncludeAssociatedObjectAttributes type = ^FillsVoids$" refID = " [GlobalId] "/>

<Conditions>

<Attribute name = "ClassName" pattern = "^OPENINGELEMENT" />

<Attribute name = "Name" pattern = "^element1$" />

</Conditions>

</IncludeAssociatedObjectAttributes>

< ObjectID value="[#TEXT#]_[associated:#TEXT#]" />

...

</Object>

In this case above, the value of the [#TEXT#] attribute along with the value of [#TEXT#] of the first associated object matching the condition is used in deriving ObjectID.

Note: The prefix "associated:" is used when referring to the associated object's attribute.

If an object is not associated with an ObjectID, it is not included in the output. This provides a means of filtering out unwanted objects. To avoid this, an entry should be created at the bottom of the mapping file that matches any object. For example:

<Object>

<ObjectID value="[#TEXT#]"/>
</Object>

Note: The log files indicate a warning message whenever multiple objects in the EIWM have a common ObjectID value. Decide if these objects must be unique, so that you must modify the relevant value in the source system or choose to use another method to determine the ObjectIDs.

The following example shows the warning message in the log file:

Object with [ObjectID]-[ClassID]-[Context]: "<ObjectID value>-<ClassID value>-<Context value>" is duplicated. Please revisit the mapping configuration.

Note: When extracting from AVEVA PID Drawings, Nozzle objects contain an attribute of its parent Equipment Tag with name ParentAvevaPIDTag.

The Nozzle attributes can then be combined to form an ObjectID consisting of Parent Equipment Tag and Nozzle Tag as shown below, where '_' is the delimiter.

<Object>

<Conditions>

<Attribute name="PidType" pattern="NOZ" />

</Conditions>

<ObjectID value="[ParentAvevaPIDTag]_[AvevaPIDTag]" />

<ClassID value="Nozzle" />

<Attributes keepUnmappedAttributes="true" />

</Object>

Related Links
TitleResults for “How to create a CRG?”Also Available in