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

AF SDK Reference

AFAnalysis.GetResults Method (Object, Int32, Boolean, AFAttribute, UOM)

AFAnalysis.GetResults Method (Object, Int32, Boolean, AFAttribute, UOM)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFAnalysis.GetResults Method (Object, Int32, Boolean, AFAttribute, UOM)
Use this method to get all the stored results for the attribute of cases of the analysis limited to the specified count beginning at the requested start time in the specified direction.

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

Syntax

public AFValues GetResults(
	Object startTime,
	int maxCount,
	bool forward,
	AFAttribute attribute,
	UOM desiredUOM
)
Public Function GetResults ( 
	startTime As Object,
	maxCount As Integer,
	forward As Boolean,
	attribute As AFAttribute,
	desiredUOM As UOM
) As AFValues

Dim instance As AFAnalysis
Dim startTime As Object
Dim maxCount As Integer
Dim forward As Boolean
Dim attribute As AFAttribute
Dim desiredUOM As UOM
Dim returnValue As AFValues

returnValue = instance.GetResults(startTime, 
	maxCount, forward, attribute, desiredUOM)
public:
AFValues^ GetResults(
	Object^ startTime, 
	int maxCount, 
	bool forward, 
	AFAttribute^ attribute, 
	UOM^ desiredUOM
)
member GetResults : 
        startTime : Object * 
        maxCount : int * 
        forward : bool * 
        attribute : AFAttribute * 
        desiredUOM : UOM -> AFValues 

Parameters

startTime
Type: SystemObject
An object representing the starting time for the cases to be returned. The value may be an AFTime, DateTime, PITime, String, or numeric. A DateTime (or a DATE will be treated as UTC time if its Kind property is set to Unspecified. Because DATE values from COM or VB6 clients are marshalled as Unspecified, these client applications must convert to UTC prior to marshalling. An integer numeric represents the number of ticks (100-nanosecond intervals) since January 1, 0001. A floating point numeric represents the number of seconds since January 1, 1970 UTC. A String is interpreted as local time, unless it contains a time zone indicator such as a trailing "Z" or "GMT". Strings will be interpreted with the AFTime.Parse Overload methods so that relative formats with intervals ("*", "T+3h", etc.) are also supported. Relative time intervals are based on the object's QueryDate.
maxCount
Type: SystemInt32
The maximum number of cases to be searched for a result value to return.
forward
Type: SystemBoolean
Indicates the direction in time from the start time to proceed when returning cases. If , then cases greater than or equal to the start time (moving forward in time) are returned. If , then cases less than or equal to the start time (moving backward in time) are returned.
attribute
Type: OSIsoft.AF.AssetAFAttribute
The AFAttribute to returned stored results for.
desiredUOM
Type: OSIsoft.AF.UnitsOfMeasureUOM
The desired unit of measure for the returned values. If , then the value is returned in the unit of measure specified by the DefaultUOM property.

Return Value

Type: AFValues
Returns the collection of attribute results values based upon the specified startTime and maxCount parameters.

Remarks

This routine will only return results that have been stored. It will not calculate values for attributes whose result has not been previously calculated and saved into the database. This routine can be significantly more performant than looping through all cases, as that method requires that all case data be loaded into the SDK.

Each returned AFValue will have its Attribute property set to the AFAttribute associated with the value.

Version Information

AFSDK


See Also

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