I'm using AFSDK and C# to correct an issue.
My PI notification server restart, and now the notifications are not running due to a weird status - "Error: Could not start the notification: ANException: EN_AnalysisNotConfigured"
I don't know why this error shows up, but the workaround techsupport gave me (and worked) was to change the time rule (located in the trigger tab of the notification) from "Natural" to "Periodic". Then start the notification, stop it, change it back to "Natural" and it works.
Only problem is there are 1500+ notifications, I can't manually switch their time rule trigger and then start them back it would take forever.
Is there a way to programmatically change the time rule of a given notification? I've gotten this far:
// Change PIAFnotification name of Fault Distance foreach (AFElement substationElement in transmissionRoot.Elements) foreach (AFElement faultDistanceRoot in substationElement.Elements) AFSortField.Name, AFSortOrder.Ascending, 400); foreach (AFNotification note in notificationList) if(note.Status == OSIsoft.AF.Analysis.AFStatus.Error)