AFAttributes.Add Method (String)
- Last UpdatedJan 12, 2026
- 2 minute read
- PI System
- AF SDK 3.2.0
- Developer
The Add method creates a new object and adds it to the collection.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.2.0.7
Syntax
public AFAttribute Add( string name )
Public Function Add ( name As String ) As AFAttribute Dim instance As AFAttributes Dim name As String Dim returnValue As AFAttribute returnValue = instance.Add(name)
public: AFAttribute^ Add( String^ name )
member Add : name : string -> AFAttribute
Parameters
- name
- Type: SystemString
The name for the new object, which must be unique within the collection. If the name ends with an asterisk (*), then a unique name will be generated based on the supplied name. See the ValidateName(String, String) method for a description of what is valid when setting the name of the object.
Return Value
Type: AFAttributeReturns the newly created object that was added to the collection.
Remarks
The new object will be created with the specified name. All other
properties of the object will be set to their default value.