AFEventFrame.CaptureValues Method (IAFDataProvider)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Capture and cache the AFAttribute values with a AFDataReference
using the specified IAFDataProvider.
Namespace: OSIsoft.AF.EventFrame
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void CaptureValues( IAFDataProvider dataProvider )
Public Sub CaptureValues ( dataProvider As IAFDataProvider ) Dim instance As AFEventFrame Dim dataProvider As IAFDataProvider instance.CaptureValues(dataProvider)
public: void CaptureValues( IAFDataProvider^ dataProvider )
member CaptureValues : dataProvider : IAFDataProvider -> unit
Parameters
- dataProvider
- Type: OSIsoft.AF.DataIAFDataProvider
A data provider that cached data can be acquired from.
Exceptions
| Exception | Condition |
|---|---|
| NotSupportedException | This exception is thrown when the EFAttributeValueCapture feature is not enabled on the PI AF Server. |
| InvalidOperationException | This exception is thrown when the EndTime has not been set. You must set the EndTime before calling this method. |
Remarks
This method will capture and cache the AFAttribute values with an AFDataReference for the event frame. The cached values are automatically updated when its StartTime or EndTime is modified after the values have been captured.
If this method is called and the EndTime has not been set, then an exception is thrown. See AreValuesCaptured for more information.