Using attributes and tags in adapters

The objects in a 3D model have attributes that have a human-readable, descriptive name and a shorter internal identifier called tag. For example, the tag of the Mass attribute is ‘mas’, and the tag of the Length attribute is ‘len’.

Some attributes are key attributes—they function as unique identifiers of an object. These attributes are usually referred to as the position ID or position tag of the object. Models that have been created with CADMATIC Plant/Outfitting typically have key attributes such as Name (nam), Valve Position (vpo), Instrument Position (ipo), Equipment Position (.n5), and Structural Position (.no).

In general, models can contain different kinds of attributes, depending on how the model was created:

  • When publishing a model with Plant Modeller, the user can select which attributes to include, and the tag names are as defined by Plant Modeller.
  • When using CADMATIC eXchanger to convert a third-party model to the Plant Modeller format, the user can define conversion mappings that determine which attributes and tags will be added to the model.

Adapters that allow CADMATIC eShare to connect to external systems can use tags to specify which attributes trigger the retrieval or generation of additional data. Adapters can use any tags, but usually the tag should identify something specific, and you are not likely to use for example Mass as a key attribute in integration.

A tag does not necessarily identify the object that contains the tag, but a group that the object belongs to, or a stock part that the object refers to. For example, if the tag identifies the part number of a stock part, you can configure an adapter that allows the user to open the relevant part's page from an online parts catalog.

Usually adapters support the following ways of using tags:

  • A single tag. This can be a tag from the original 3D model file (.ebm) or a group tag, or the tag of a Derived Attribute.
  • A list of tags. You might need to define a list of tags instead of a single tag if the expected data might be found in different tags, depending on the object (for example, in equipment position ID or valve position ID).
  • Compound tags. These are attribute combinations that must match the external data source. For example, spools can be identified by the combination of the attributes Isometric Drawing Number (Idn) and Spool Number (spn). Compound tags only support a single data source, and it is recommended to use derived attributes instead. When creating an CADMATIC eShare project from a CADMATIC design application, the default attribute configuration includes an attribute that combines the ‘Idn’ and ‘spn’ tags to generate a unique Spool Name attribute.

Tags are case-sensitive, so make sure that you type the tag name correctly.

When providing data for groups, you have two options:

  • Use the member tag of the group, for example ‘sys’ for System. Both the group and its members show the data provided by the adapter.

  • Use the group tag of the group, for example ‘[sys]’ for System (Group). Only the group itself shows the data provided by the adapter.

    In both cases, it is assumed that a group has been defined in Attribute Settings.