Pen Names from UDTs in the Power Chart

When adding the same tag from different instances of a UDT into a Power Chart, the Pen Name automatically changes to show that they are not the same tag by adding UDT folder and Instance Name in front of the tag name.

image

The first tag added shows a Pen Name with only the tag name on that specific tag inside the UDT. When adding a second tag from another instance of the UDT, the folder where the tag is placed inside the UDT is added in the Pen Name. On the third, fourth, and so on the Instance name is also added.

Is it possible to make the Pen Name always show the full path and name of the tags? This would be more user friendly when comparing tags in different instances of the same UDT.

I think it's a bug, it has been mentioned before:

There are a couple of other similar posts flying around. Might be best to create a ticket with IA support.

Thank you for the info @matthew.ayre, I will contact IA Support.

1 Like

This is the response from tech support. I asked about the same issue. When the tag names are the same, it uses the first tag, but adds the folder to subsequent tags to differentiate. I have not tried the proposed solution.


Colton Connor (Inductive Automation)
Jul 8, 2021, 1:04 PM PDT
Hello Ali,

After the first tag is added to the Power Chart, any duplicate tags will include an additional part of the tag path in the pen name to differentiate itself from the other pens. This is the expected behavior.

I was able to locate your forum post and, unfortunately, there is no setting that can be changed to have the first added pen include both the tag name and the folder in its name. You will have to manually edit the pen name by clicking on the “Edit Pen” icon next to the first added pen.

Another solution would be to add a Property Change Script to the pens property in the PROPS section of the Perspective Property Editor that parses the data > source property and sets the name property of the pen to this value. Add the script below to a Property Change Script on the pens property:

if len(self.props.pens) > 0:
for i in range(len(self.props.pens)):
parts = self.props.pens[i].data.source.split(’:’)
self.props.pens[i].name = parts[-1]

Let me know if this works.

Best,

Colton Connor

Hi @Ali.Etezadkhah,

IA support sent me the same Property Change script. I have tested it, and it works. :slight_smile: