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

AVEVA™ Gateway for 1D Data

ContextID Mapping

  • Last UpdatedNov 04, 2025
  • 3 minute read

ContextID Mapping determines the ID of the context within which an ObjectID resides.

Each mapping entry in the configuration is examined in sequence and the first mapping entry to match is used to generate the object’s context ID.

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

<Object>

<Conditions>

<Attribute name="object_context" pattern="ROOT" />

</Conditions>

<ContextID value="[object_context]" />

</Object>

You can specify multiple levels of context using the ‘|’ character to separate levels:

<Object>

<Conditions>

<Attribute name="object_context" pattern="ROOT" />

<Attribute name="object_subcontext" pattern="PARENT" />

<Attribute name="object_Childcontext" pattern="CHILD" />

</Conditions>

<ContextID value="ROOT|PARENT|CHILD">

</ContextID>

</Object>

<Object>

<Conditions>

<Attribute name="object_context" pattern="ROOT" />

<Attribute name="object_subcontext" pattern="PARENT" />

<Attribute name="object_Childcontext" pattern="CHILD" />

</Conditions>

<ContextID value="[object_context]|[object_subcontext]|[object_Childcontext]">

</ContextID>

</Object>

Note: Conditions may hold multiple attribute elements. All conditions must be met for the mapping to be applied.

You can use Lookups and transforms to modify context value.

<Object>

<Conditions>

<Attribute name="object_context" pattern="ROOT" />

</Conditions>

<ContextID value="[object_context]">

<Transforms>

<Replace pattern="\d{2}" value="yyy" />

</Transforms>

</ContextID>

</Object>

<Object>

<Conditions>

<Attribute name="object_context" pattern="ROOT" />

</Conditions>

<ContextID value="[object_context]">

<Lookup id="csv Map" >

<FailAction action = "EmptyValue" />

</Lookup>

</ContextID>

</Object>

Use objects from associated objects to modify the value of ContextID, as shown below:

<Object>

...

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

<Conditions>

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

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

</Conditions>

</IncludeAssociatedObjectAttributes>

<ContextID value="[ClassName]_[associated:ClassName]" />

...

</Object>

In this case, the value of the ClassName attribute along with the value of ClassName of the first associated object matching the condition is used in deriving ContextID. The prefix "associated:" is used when referring to the associated object's attribute.

If an object does not match any of the mapping entries, it is not assigned any context. To set a default context that is used if none of the other mapping entries match, an entry with no qualifiers should be created at the bottom of the mapping file:

<Object>
<ContextID value="AVNGATE" />
</Object>

Often when importing tag data into AIM the tag’s ContextID is already defined. In the case where this shouldn’t be changed, you should ensure that the EIWM doesn’t contain any definition of ContextID for the relevant objects. This can be achieved in base mapping by the following methods:

  • <ContextID value="" />

  • <ContextID value=" " /> (Space)

For example, using the following base mapping:

Will produce EIWM output without ContextID (nor ClassID) defined:

Note: If the EIWM loader has Project Context set to Avngate and override is set to true then in each of the above cases the ContextID will be set to Avngate in the EIWM.

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