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

AF SDK Reference

PIIdentities.Add Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
PIIdentities.Add Method
Creates a new PIIdentity with the passed in name.

Namespace:  OSIsoft.AF.PI
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public PIIdentity Add(
	string name,
	PIIdentityType type = PIIdentityType.PIIdentity
)
Public Function Add ( 
	name As String,
	Optional type As PIIdentityType = PIIdentityType.PIIdentity
) As PIIdentity

Dim instance As PIIdentities
Dim name As String
Dim type As PIIdentityType
Dim returnValue As PIIdentity

returnValue = instance.Add(name, type)
public:
PIIdentity^ Add(
	String^ name, 
	PIIdentityType type = PIIdentityType::PIIdentity
)
member Add : 
        name : string * 
        ?type : PIIdentityType 
(* Defaults:
        let _type = defaultArg type PIIdentityType.PIIdentity
*)
-> PIIdentity 

Parameters

name
Type: SystemString
Name of the new PIIdentity
type (Optional)
Type: OSIsoft.AF.PIPIIdentityType
Type of the new PIIdentity

Return Value

Type: PIIdentity
Reference to the new PIIdentity.

Exceptions

ExceptionCondition
InvalidOperationExceptionIf a PIIdentity 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

See Also

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