Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PIStateSets.Add Method (String)

  • Last UpdatedNov 18, 2025
  • 2 minute read
PIStateSets.Add Method (String)
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: AFEnumerationSet
Reference to the new state set represented as an AFEnumerationSet.

Exceptions

ExceptionCondition
InvalidOperationExceptionIf a state set with the same name already exists.

Remarks

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in