Introduction

The Excel tools can be used to add tags to components.

It can handle different types of tags (listed below): markers or value tags.

  • If the cell is empty, no tag will be added

  • If the cell value is set to - , the tag will be created with no value. Cannot be used for the markers

It is also possible to set the tags flags during the import.

Example

In the example below, some markers tags are added on the first column (separated by a semi-column) and a value tag (hs:stage) is defined with its own column. The value for this tag is then set in the cells. Notice that the second one use a - to indicate to create the tag but to put the default value.

Tags
Define the tag key in the column header or in the cells separated with ;
markershs:stage{baja:Double}




hs:heat
hs:cmd;hs:valve2
hs:cmd;hs:valve-


This is the result of the second line:

And of the third line (with the default value)

Columns syntax

Create a column called "Tags". Then you can have different subcolumns:

  • markers to define all the markers tags

  • tags value using the following format: dictionary:key{Niagara TypeSpec of the slot}. Example: b:myTag{baja:Double}. If no TypeSpec is given, the system will use a BString by default.

  • (optional) you can set the flags of your tags by adding the following format {flags: flags symbols}. The flag symbols are the characters you can see in the slot sheet in the flags column. Example: {flags: hs} to add the hidden and the summary flags. This format must be added after the TypeSpec in the subColumn

Since the 46.17, the format has been changed: the type must now be between brackets.
The parenthesis still work, but on the export, they will be replaced.


Accepted values

  • For the markers SubColumn, a list of tags (dictionary:key) separated by semicolons. Example: hs:ahu;hs:hvac

  • For the other tags, the following TypeSpecs are supported:

    • baja:Marker

    • baja:String

    • baja:Integer

    • baja:Long

    • baja:Float

    • baja:Double

    • baja:Boolean

    • baja:Ord

    • baja:DynamicEnum (the cell value must be the tag, escaped or unescaped, not the ordinal)

    • baja:RelTime (the value must be in seconds)
    • baja:AbsTime (the value text must strictly conform to the ISO 8601 standard format of "yyyy-mm-ddThh:mm:ss.mmm[+/-]hh:mm")

IMPORT

If the tag is a DynamicEnum, the active framework is needed to decode the tag. The range will be taken from the sourceTag associated to the tag.

Since the 46.16.0, it's not possible to update a readOnly tag. However you can add the "tagReadOnly:" prefix to your subColumn (example: tagReadOnly:b:myTag(baja:Double). This prefix will allow you to export your data and create the tag (in another station for example) and it will be ignored if you try to update a tag.

If flags are present in the subColumn, the flags of the slot will be overriden. The metadata flag will always be added. If the tagReadOnly: prefix is present in the subColumn, the readOnly flag will also be added

EXPORT

All the slots with the metadata flag matching the subColumns in the Tag Column will be exported.

If the value is a baja:DynamicEnum the value will be unescaped

Since the 46.16.0, the tool won't create new columns to host new tags.

Try it yourself !

Here is the file used in the above import example. Download it, try importing it and see the result.
addTags.xlsx