Current tag name from Vision Client tag expression

Hi,
I’m looking for a way, from a Vision Client tag (not a UDT), to get an expression that will return the current tag name (or the current tag path from where I can easily get the tag name).

I will use this expression (that return the tag name) inside another expression that will return a value based on this tag name. The goal is to be able to copy/paste a lot of tags and only have to take care of the tag name without having to change the expression each time.

Thanks

Can you post pseudo-code to give a better idea of your desired finished project?

Try this:

{[~]CurrentTagName.Path}

Replace “CurrentTagName” with the name of your tag.

Heh. That’s the part the OP wants to extract.

Next time, I should probably drink more coffee before I try and help someone :smile:
Probably needs a UDT to access the whole {PathToTag} stuff.

Heh. Vision Client Tags don’t support UDTs. More coffee?

BTW, if one were to use my objectScript expression function, and use java reflection on the binding, one might find interesting things.

No further hint from me, as the only practical use would be feeding a variation on the name to the tag() expression function. Which is just wrong.

2 Likes