PIStateSets.Add Method (String)
- Last UpdatedJan 12, 2026
- 2 minute read
- PI System
- AF SDK 3.2.0
- 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.2.0.7
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. |