I am in the process of writing a custom data reference. I want the value calculated to be written to a PI Tag. If I am creating a single data reference I know how to do this. The problem arises when I use the custom data reference in a template. Specifically, when I'm using the custom data reference for a single element, I can write \\PIserver\ElementName\tagName, but when I'm using a template, I would normally use the element syntax: i.e. \\PIserver\%Element%\tagName but this doesn't seem to work. When using a PI Point, at least, the percent signs are parsed to use the correct element. I naively thought the same syntax would work if I applied it to the static AFAttribute method FindAttribute(string,AFObject). So my question is: is there a way to "inherit" such functionality or would I need to write my own custom parsing code?
Thanks in advice for any thoughts and comments. I greatly appreciate your time.