AFValues.GetValueArrays Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void GetValueArrays( out Object[] values, out DateTime[] timestamps, out AFValueStatus[] flags )
Public Sub GetValueArrays ( <OutAttribute> ByRef values As Object(), <OutAttribute> ByRef timestamps As DateTime(), <OutAttribute> ByRef flags As AFValueStatus() ) Dim instance As AFValues Dim values As Object() Dim timestamps As DateTime() Dim flags As AFValueStatus() instance.GetValueArrays(values, timestamps, flags)
public: void GetValueArrays( [OutAttribute] array<Object^>^% values, [OutAttribute] array<DateTime>^% timestamps, [OutAttribute] array<AFValueStatus>^% flags )
member GetValueArrays : values : Object[] byref * timestamps : DateTime[] byref * flags : AFValueStatus[] byref -> unit
Parameters
- values
- Type: SystemObject
Array of objects containing the value of each AFValue Value in the AFValues collection. - timestamps
- Type: SystemDateTime
Array of UTC timestamps containing the value of each AFValue Timestamp in the AFValues collection. - flags
- Type: OSIsoft.AF.AssetAFValueStatus
Array of flags containing information about the status of each AFValue object in the AFValues collection.
Remarks
This method will return the collection of values and their associated timestamps and flags as three synchronized arrays. This method is useful if these 3 objects are all that is needed from the AFValue object. It also makes it easier to inter-operate with other system?s data because it converts everything into standard .NET arrays instead of an AFValues collection.
The three Arrays returned from the GetValueArrays methods have the same dimension. They contains the same number of elements as the number of AFValue objects in the AFValues collection, and are 0 based.
The Flags array contains a bit masks for the IsGood, Annotated, Questionable and Substituted flags of a AFValue. The AFValueStatus enumeration can be used to interpret each value.