PIStateSets.Add Method (String)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Creates a new PI Digital State set with the passed in name.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFEnumerationSet Add( string name )
Public Function Add ( name As String ) As AFEnumerationSet Dim instance As PIStateSets Dim name As String Dim returnValue As AFEnumerationSet returnValue = instance.Add(name)
public: AFEnumerationSet^ Add( String^ name )
member Add : name : string -> AFEnumerationSet
Parameters
- name
- Type: SystemString
Name of the new state set
Return Value
Type: AFEnumerationSetReference to the new state set represented as an AFEnumerationSet.
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | If a state set with the same name already exists. |