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 (AFSearchMode, Object, Object, Int32, AFAttribute, UOM)

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

  • Last UpdatedNov 18, 2025
  • 4 minute read
AFAnalysis.GetResults Method (AFSearchMode, Object, Object, Int32, AFAttribute, UOM)
Use this method to get all the stored results for the attribute of cases of the analysis between the specified start and end times.

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

Syntax

public AFValues GetResults(
	AFSearchMode searchMode,
	Object startTime,
	Object endTime,
	int maxCount,
	AFAttribute attribute,
	UOM desiredUOM
)
Public Function GetResults ( 
	searchMode As AFSearchMode,
	startTime As Object,
	endTime As Object,
	maxCount As Integer,
	attribute As AFAttribute,
	desiredUOM As UOM
) As AFValues

Dim instance As AFAnalysis
Dim searchMode As AFSearchMode
Dim startTime As Object
Dim endTime As Object
Dim maxCount As Integer
Dim attribute As AFAttribute
Dim desiredUOM As UOM
Dim returnValue As AFValues

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

Parameters

searchMode
Type: OSIsoft.AF.AssetAFSearchMode
Determines how the startTime and endTime parameters are treated when searching for case objects to be included in the returned collection.
startTime
Type: SystemObject
An object representing the earliest 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.
endTime
Type: SystemObject
An object representing the latest ending time for the cases to be returned. When the specified startTime is earlier than the endTime, the items in the resulting list will be indexed in time ascending direction. If the startTime is more recent than the endTime, the items in the resulting list will be indexed in time descending direction. 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.
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 endTime 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