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

AF SDK Reference

AFLayers.Add Method (String)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFLayers.Add Method (String)
The Add method creates a new object and adds it to the collection.

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

Syntax

public AFLayer Add(
	string name
)
Public Function Add ( 
	name As String
) As AFLayer

Dim instance As AFLayers
Dim name As String
Dim returnValue As AFLayer

returnValue = instance.Add(name)
public:
AFLayer^ Add(
	String^ name
)
member Add : 
        name : string -> AFLayer 

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: AFLayer
Returns 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.

Version Information

AFSDK


See Also

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