PIStateSets.Add Method (AFEnumerationSet)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Adds the passed in AFEnumerationSet to the PI Digital State Sets collection.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void Add( AFEnumerationSet item )
Public Sub Add ( item As AFEnumerationSet ) Dim instance As PIStateSets Dim item As AFEnumerationSet instance.Add(item)
public: virtual void Add( AFEnumerationSet^ item ) sealed
abstract Add : item : AFEnumerationSet -> unit override Add : item : AFEnumerationSet -> unit
Parameters
- item
- Type: OSIsoft.AF.AssetAFEnumerationSet
The set to be added
Implements
ICollectionTAdd(T)
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | If a state set with the same name already exists. |