Description

The NodeTag component is part of the model. It allows a tag to be automatically added to a Node.

It must be added in a definition (NodeDefinition, SystemDefinition, etc.) and applies to all child Nodes of this definition. The following types of tags are available:

  • Marker
  • String
  • Double
  • Integer
  • Boolean
  • DynamicEnum (it is necessary to add a range in the facets)

This is the NodeTag name which is used for the creation of the tag and not the displayName.

It is therefore advisable not to use a displayName on the NodeTags to avoid confusion.


Implementation

Add a NodeTag in a NodeDefinition

(warning) The name of the NodeTag will become the name of the tag added to the Nodes, so it is strongly recommended that the tag name be in the format "nameShortDictionary:TagName" (e.g.: b:area)

(info) It is possible to define a tag from any dictionary (e.g.: hs:ahu for the Haystack dictionary).

If no dictionary is specified, the tag will be created in the BtibDictionary dictionary (and a b: will thus be added in the Nodes)


Properties

  • Status: NodeTag status. Can be {ok}, {fault}, {disabled} or {null}. See the corresponding actions.
  • FaultCause: Message that complements the state of the NodeTag (generally used to explain the reason for an initialization failure)
  • Tip: Description of the tag. Used in views (including NodeCreator)
  • DefValue: The default value of the tag when added to a Node
  • Flags: Adds flags to the tag of each Node. Only hidden and readonly are handled.
  • Facets: Adds facets to the tag of each Node. See Facets.


Actions

  • Initialize: Initializes the NodeTag and changes its state to {ok} or {fault}. Creates the tag in its "sibling" Nodes (those located in the same definition) if it does not exist
  • Disable: Disables the NodeTag and changes its state to {disabled}. Disables the tag added in the Nodes (but keeps the slot, which keeps the tag value). This action is reversible by an initialization.
  • Clean: Clears the NodeTag and changes its state to {null}. Deletes the slot added in the Nodes. This action is irreversible and must be performed before permanently deleting the NodeTag.