Is there a way to create e-mail formats through the SDK?
I peered into the xml file exported from the example one I created in pis system explorer, see attached, and started to get scared.
I was curious as well. Check out this link: AFNotificationContent Class
It appears you can! I never tried it, but seems like a fun project So many features of the PI System...
Interesting, when I play around with that example and try to check in I get
I was pretty sure I had the latest AF SDK installed
This is the code, pretty much cut / paste from the AF SDK help which says
Supported in: 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5, 2.4, 2.3
// Create a Notification Template
AFNotificationTemplate myNotificationTemplate = new AFNotificationTemplate("MyNotificationTemplate");
AFNotificationContact myTmplContact1 = myNotificationTemplate.NotificationContacts.Add("MyContact#1");
AFNotificationContent myTmplContent1 = myNotificationTemplate.Contents.Add("MyContent#1");
I'm at a loss...
Interesting. It looks like this is probably for the "old" style of Notifications. I see AFDeliveryFormat Class but all the methods are read only...
As you likely know there was a major rewrite of PI Notifications issued with AF SDK 2016 R2. With earlier PI Notification versions access was through ANSDK but today everything needed should be implemented with AF SDK (AF Client 2016 R2 and later).
I was looking at the PI Server 2016 R2 documentation and see that with PI System Explorer Notification Rules and Notification Rule Templates offer a Manage Formats link within the Subscription pane which allow to adjust the email format. Looking at the AF SDK Reference, I was however not able to find a lose end to start with. For this reason I've asked AF SDK development for assistance.
thanks so much for your help, I have successfully been able to create and manage all the template types thusfar, the last on my list is the e-mail formats.
Please let me know what the AF development team comes back with. Right now I'm trying to use/create AFDeliveryFormats and I'm not getting very far....
You are not forgotten. Following up with AF Development was one of my first actions this morning but I haven't heard back until now.
Thanks I truly appreciate the effort!
There was an issue with the guy in front of my screen. I don't like to go into the details as of why I didn't see the reply from the developer on Escalation schedule.
The developer forwarded my questions to the PI Notifications development team. We will keep you updated.
I have been away from doing anything with the SDK for a bit, is there any development in this? I will probably have to get back into it tomorrow, I have made a few feeble attempts to try to create a Delivery Format but have not advanced very far
// ************ start add a Delivery Format ***********
AFDeliveryFormat myDeliveryFormat = null;
myDeliveryFormat.Name = "MyDevFormat";
// ************ end add a Delivery Format ***********
I've created a blog post describing how to do this. It doesn't cover every possible case, so you'll have to tell me if there's something you want to see.
Thank you Mike for helping with your expertise!
Thanks so much Mike! I've been busy on other issues and not had a chance to get back to this but that is a huge help!
Retrieving data ...