AFCase.CollectTransfers Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public bool CollectTransfers()
Public Function CollectTransfers As Boolean Dim instance As AFCase Dim returnValue As Boolean returnValue = instance.CollectTransfers()
public: bool CollectTransfers()
member CollectTransfers : unit -> bool
Return Value
Type: BooleanReturns if the operation was successful. Any messages generated during the collection process will be output using AFTrace.
Remarks
The AFAnalysisRule used by this method is defined by the AFAnalysis that owns this case. The analysis rule's CollectTransfers method is used to determine which transfers to add to the Elements collection. The default implementation uses the IsActiveTransfer(AFTransfer) method to determine which of the transfers in the model are active for the case. This method controls the active transfers returned in the Elements collection.
Any existing transfers in the Elements collection will be removed. To remove all elements and transfers first call the CollectElements method. All results associated with transfer attributes will also be removed from the Results.
This method updates the CollectTransfersTime property. If there are no errors, the CollectTransfersTime will be set to the current time. If an error occurs, the time will be set to AFTime.MinValue to indicate that transfers have not been successfully collected.
The Before event is raised before this operation is started to allow clients an opportunity to perform any required validation or processing before starting the operation. The operation can also be canceled by setting the Cancel property of the AFCaseCancelEventArgs parameter to the event. The Executing event is raised during the execution of the operation to allow clients an opportunity to cancel and not wait for the operation to complete. The After event is raised after the operation is completed to allow clients an opportunity to perform any post-processing.
| You must have Execute security rights to collect transfers for a case. |