You can open an exported tag dictionary (CSV format) in Microsoft Excel or other CSV-compatible spreadsheet software, or even
a text editor. The file is structured correctly, ready for you to enter a namespace and add tag definitions and other types
of definitions, as needed.
Prerequisites:
- Tag dictionary exported to CSV format
- CSV-compatibile spreadsheet software
Perform the following steps:
- Open the exported CSV file ,which should resemble the one shown here.
- In cell B1, enter a
Namespace for this tag dictionary, typically only a few characters, for example: MyTags.
NOTE: Avoid using a namespace that conflicts with that of other installed tag dictionaries, such as “n” (NiagaraTagDictionary) or
“hs” (HaystackTagDictionary).
- Starting under the
Tag Definition section, in Row 18, enter the first of your tagDefinition entries (one per row). Be be sure to note the following information:
| Row |
Description |
| Row 4 |
Tag Definition section: define the tags for your dictionary in this area.
|
| # |
Rows that begin with # are comment lines which show examples or explanatory comments which may be helpful to retain in the file.
|
| Row 5 |
Row 5 is an example of the pattern to use to define a tagDefinition entry. You must define tag name and tag type.
|
| Row 6–17 |
Row 6–17 show valid tag types that can be used.
Validation Rules columns: Validation rules are optional. These columns are used to define NEQL query predicates that will
be used to suggest where the tag can be applied. For a particular tag definition entry, if more than one of these columns
have values, they will be wrapped in a tagdictionary:And function.
- hasTag: This tag may be applied if the target component also matches this NEQL tag query.
- hasAncestor: This tag may be applied if the target component has an ancestor that matches this NEQL tag query.
- isType: This tag may be applied to the target component if it is one of these types. Value must be entered in the "module:ClassName"
form.
If more than one type is entered separated by a space, it will be treated as an "or" function. Example: driver:Device driver:PointFolder:
The tag is valid on a BDevice or a BPointFolder.
- hasRelation: This tag may be applied if the target component has this relation and has the tags that are listed in the hasRelationFilter
(3.c.v) column.
hasRelationFilter: This is a tag filter used with hasRelation (3.c.iv) validation check.
Units: Units are optional and can be used to define a measurement unit used for a tag that has a value. The value entered
is used as the unitName argument in the BUnit.getUnit(String unitName). Example: "square foot" for a tag whose value is an
area.
|
- Under the TagGroupDefinitions section (optional), add a row for each TagGroup, defining a GroupName that will be used to represent
this collection of tags.
- Add one or more tag rows under the TagGroup one row for each tag in the group.
NOTE: Tags included in a TagGroup must also be defined in the TagDefinitions section.
- Under the RelationDefinitions section (optional), add a row for each relation defining a RelationName and enter Relation in the Type column.
- Under the RuleDefinitions section (SmartTagDictionaries only), define the rules for implied tags and relations.
- Add a row for each TagRule, enter a RuleName and one or more validation rule column values. See information on Validation
Rules listed under Step 3.
- Under the tag rule row, add a row for each implied tag for this rule entering a name, type and a smart type. The smart type
should be in the module:class format.
- If there are any implied tag groups for this rule add a row for each with the GroupName entered in the groupName column.
- If there are any implied relations for this tag rule, add a row for each with the RelationName in the name column and enter
Relation in the type column.
Your edited tag dictionary is complete and ready to import. An example of an edited tag dictionary in CSV file format, shown
here.
 |
Namespace = my |
 |
Tag Definitions — notice tagDefinitions, area and temp are configured with Validity Rules
|
 |
Tag Group Definitions — notice oaTemp tagGroup is configured with a Validity Rule and the group contains three tagDefinitions. (outside, air, and temp).
|
 |
Relation Definitions — defines one Relation, buildingRef |