AFAnnotations.Add Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Create a new AFAnnotation object and adds it to the list.
Namespace: OSIsoft.AF.Data
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFAnnotation Add( string name = null, Object value = null )
Public Function Add ( Optional name As String = Nothing, Optional value As Object = Nothing ) As AFAnnotation Dim instance As AFAnnotations Dim name As String Dim value As Object Dim returnValue As AFAnnotation returnValue = instance.Add(name, value)
public: AFAnnotation^ Add( String^ name = nullptr, Object^ value = nullptr )
member Add : ?name : string * ?value : Object (* Defaults: let _name = defaultArg name null let _value = defaultArg value null *) -> AFAnnotation
Parameters
- name (Optional)
- Type: SystemString
The Name for the newly created annotation. - value (Optional)
- Type: SystemObject
The Value of the newly created annotation.
Return Value
Type: AFAnnotationThe new AFAnnotation that was created and added to the list.
Remarks
Creates a new AFAnnotation object initialized to the
specified values of the parameters and add it to the list.