AnsweredAssumed Answered

Get PIPoint attributes from AF SDK using Python AF

Question asked by S.Ely on Apr 25, 2017
Latest reply on Apr 27, 2017 by John Messinger

I have code connecting to the PI AF SDK using python, but I am having a hard time figuring out how to get the description for a tag. I get the following error:

 

"The PI Point attribute 'descriptor' was not found. The attribute must be loaded before attempting to get its value"

 

My code throwing the errors:

 

def create_taglist():

    tags = PIPoint.FindPIPoints(piServer, 'LS*RMS Current')

    taglist = {}

    for tag in tags:

        tag.LoadAttributes('Descriptor')

        taglist[tag] = {

            'descriptor': tag.GetAttribute(PICommonPointAttributes.Descriptor)

        }

    return taglist

Outcomes