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

AF SDK Reference

AFLibraries.Add Method (String, String)

  • Last UpdatedJan 12, 2026
  • 2 minute read
AFLibraries.Add Method (String, String)
Creates a library from an exported string or file.

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

Syntax

public AFLibrary Add(
	string xml,
	string name
)
Public Function Add ( 
	xml As String,
	name As String
) As AFLibrary

Dim instance As AFLibraries
Dim xml As String
Dim name As String
Dim returnValue As AFLibrary

returnValue = instance.Add(xml, name)
public:
AFLibrary^ Add(
	String^ xml, 
	String^ name
)
member Add : 
        xml : string * 
        name : string -> AFLibrary 

Parameters

xml
Type: SystemString
The XML data to create the library from. If the string is in the form of a file name or URL, it will attempt to load the XML from the file.
name
Type: SystemString
The name to be used for the exported library. See the ValidateName(String, String) method for a description of what is valid when setting the name of the object.

Return Value

Type: AFLibrary
Returns the newly created library.

Remarks

To update a library that already exists, the existing library must first be removed and then added back with the new updates.

Version Information

AFSDK


See Also

In This Topic
Related Links