I have just been trying to use the .Changed event on the PIServer obect in the AFSDK v4, but I have some questions regarding it's utility. Specifically what I was hoping for is that I would be able to detect changes to PI Tag attributes and such, specifically those made to the Span and Zero properties of a PI tag, however this doesn't appear to be working. My approach to test this has been to modify the values using PointBuilder in PI SMT and then pressing a button in my test app that calls the following code...
OSIsoft.AF.PI.PIPoint testPoint = OSIsoft.AF.PI.PIPoint.FindPIPoint(testServer, "SINUSOID"); testServer.Refresh(); testPoint.LoadAttributes(PICommonPointAttributes.Tag, PICommonPointAttributes.PointID, PICommonPointAttributes.Span, PICommonPointAttributes.Zero);
After executing this I can see the updated value etc and can retreive it by calling
object value = testPoint.GetAttribute(PICommonPointAttributes.Span);
But my event handler doesn't seem to get called. All of this all works when I use it in a similar fashion with an AFDatabase object, so I guess my questions are...
1. Should this work/ what am I doing incorrectly?
2. If not what sort of changes does the change event get triggered by on the PIServer and is there anywhere I can find a comprehensive list of these relating specifically to the PIServer object (I've looked in the .chm file but it doesn't give any real details)?