AnsweredAssumed Answered

PiPoint.GetAttributes returns outdated values at irregular intervals

Question asked by ArminS on Jul 9, 2018
Latest reply on Jul 10, 2018 by Dan Fishman

In our application we try to update attributes of multiple PiPoints. Each point has a different list of attributes so we have to iterate over each point of a server and update the attributes by calling SaveAttributes instead of using  PiPointList.SaveAttributes. When we use the code for updating the attributes (see below) on our development server everything works fine. The attributes are updated on the PI server and fetched again from the server (to insure the values were really updated). On productive server this codes works pretty well most of the times, but at irregular intervals it seems that GetAttributes returns outdated or cached values.


Could it be that the results of GetAttributes are depending on how fast the PIServer in the background is or how busy the PIServer is at the moment? Should we use LoadAttributes instead? How can we ensure that we get the updated data (without cache) from the PIServer after the SaveAttributes call?


var piPoints = PIPoint.FindPIPoints(server, pointNames);

var piPointsWithNewAttributes = ...

foreach (var (piPoint, newAttributes) in piPointsWithNewAttributes)


       var response = piPoint.SaveAttributes(newAttributes.UseOsiBuiltInTypes());

        if (response == null) // successful


             transferedPoints.Add(piPoint, piPoint.GetAttributes());




Thank you very much for your help.