AFNotificationRule.CreateNotificationRuleTemplate Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Create an AFNotificationRuleTemplate based upon the AFNotificationRule object.
Namespace: OSIsoft.AF.Notification
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFNotificationRuleTemplate CreateNotificationRuleTemplate( string name )
Public Function CreateNotificationRuleTemplate ( name As String ) As AFNotificationRuleTemplate Dim instance As AFNotificationRule Dim name As String Dim returnValue As AFNotificationRuleTemplate returnValue = instance.CreateNotificationRuleTemplate(name)
public: AFNotificationRuleTemplate^ CreateNotificationRuleTemplate( String^ name )
member CreateNotificationRuleTemplate : name : string -> AFNotificationRuleTemplate
Parameters
- name
- Type: SystemString
The name for the created AFNotificationRuleTemplate. If the name ends with an asterisk (*), then a unique name will be generated based on the supplied name. See the ValidateName(String, String) method for a description of what is valid when setting the name of the object.
Return Value
Type: AFNotificationRuleTemplateIf the AFNotificationRule is already created from an AFNotificationRuleTemplate, then it will not do anything and just return the already configured Template. Otherwise, the newly created AFNotificationRuleTemplate is returned.
Remarks
A new AFNotificationRuleTemplate is created with the specified name based on the current AFNotificationRule.
If the AFNotificationRule is already created from a Template, then this method does not make any changes and just returns the current Template.
| This will automatically apply the changes to this AFNotificationRule and the newly created AFNotificationRuleTemplate to the PI AF Server. |