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

AF SDK Reference

AFDatabase.AddTransfer Method (String, AFElementTemplate)

AFDatabase.AddTransfer Method (String, AFElementTemplate)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFDatabase.AddTransfer Method (String, AFElementTemplate)
Creates a new transfer based upon the specified template.

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

Syntax

public AFTransfer AddTransfer(
	string name,
	AFElementTemplate template
)
Public Function AddTransfer ( 
	name As String,
	template As AFElementTemplate
) As AFTransfer

Dim instance As AFDatabase
Dim name As String
Dim template As AFElementTemplate
Dim returnValue As AFTransfer

returnValue = instance.AddTransfer(name, 
	template)
public:
AFTransfer^ AddTransfer(
	String^ name, 
	AFElementTemplate^ template
)
member AddTransfer : 
        name : string * 
        template : AFElementTemplate -> AFTransfer 

Parameters

name
Type: SystemString
The name for the new transfer object. The name is validated to be unique within the collection of transfers currently loaded on the client. This does not guarantee that the name will be unique, but helps to prevent duplicate names from being created. 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.
template
Type: OSIsoft.AF.AssetAFElementTemplate
The template that is to be used to create the new AFTransfer object. Only templates with its InstanceType set to an AFTransfer type can be used to create a transfer. If , then the transfer is created without a template and properties normally defined by the template will be defined by the transfer instead.

Return Value

Type: AFTransfer
Returns the AFTransfer that was added.

Remarks

This method creates a new transfer with the specified name based upon the template. The Description property of the new transfer defaults to the same as the template's description, but you can change it as needed. The StartTime, EndTime, Source, and Destination are initially left undefined; you must update these before checking in. All the other properties are defined by the template and cannot be modified without changing the template.

Version Information

AFSDK


See Also

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