Graphics Builder > Genies > Create a New Genie > Use Structured Tags with Genies

Use Structured Tags with Genies

When you define a Genie, you can add a prefix or suffix to a Genie property to generate the complete tag when the Genie is used. For example, you could define a Genie property as follows:

%tag%_PV

If you then use "DEV1" for the tag, the Genie will generate the complete tag:

DEV1_PV

This is also the case if you reference the variable tag using the associated equipment and item name:

%equipment.item%_PV

If you use "PUMP.SPEED" for equipment.item, the Genie will generate the complete tag:

PUMP.SPEED_PV

You can add extra information at the beginning (prefix), or on the end (suffix) of the Genie property, or use both a prefix and suffix in the same Genie property. For example, if you have defined a loop controller with three bar graphs (created using the fill property in a rectangle) to display the tags DEV1_PV, DEV1_SP and DEV1_OP, you can configure a Genie as follows:

Level expression

%PV_Tag%

Level expression

%SP_Tag%

Level expression

%OP_Tag%

This configuration means each rectangle has a separate Genie tag.

When you configure the Genie (with the Genie dialog), you have to enter three separate tags: DEV1_PV, DEV1_SP and DEV1_OP. However, if you use structured tags, you can configure the rectangles as follows:

Level expression

%Tag%_PV

Level expression

%Tag%_SP

Level expression

%Tag%_OP

In this case, you only have to enter one tag (DEV1) to generate six objects. The Genie automatically concatenates DEV1 with either _PV, _SP, or _OP, depending on where the tag is substituted. As well as a reduction in configuration time, this Genie is easier to maintain.

Note: The above example illustrates the power of Genies. The more complex and the greater number of objects in a Genie, the greater the advantage of using structured tags. You can also make complex Genies by using multiple variables for a Genie property. For example, "%Level%_TIC_%Occ%_PV" or any combination of prefix, suffix and number of Genie variables.

See Also

Published June 2018