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

AF SDK Reference

AFAttributes.GetValue Method (AFCase)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFAttributes.GetValue Method (AFCase)
This method gets the value for each attribute in the list based upon its data reference configuration and the specified AFCase context.

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

Syntax

public AFValues GetValue(
	AFCase caseContext
)
Public Function GetValue ( 
	caseContext As AFCase
) As AFValues

Dim instance As AFAttributes
Dim caseContext As AFCase
Dim returnValue As AFValues

returnValue = instance.GetValue(caseContext)
public:
AFValues^ GetValue(
	AFCase^ caseContext
)
member GetValue : 
        caseContext : AFCase -> AFValues 

Parameters

caseContext
Type: OSIsoft.AF.AnalysisAFCase
The case context to be used when getting the attribute's value. If the case context is , then no context is used when getting the attribute's value. If the case context is not and the case context is not supported by the attribute's configuration, as indicated by the SupportedContexts property, then the context will be changed to an AFTimeRange context represented by the case's start and end times.

Return Value

Type: AFValues
Returns the value of each AFAttribute in this list. The index or order of each value in the returned collection corresponds to the index or order of the attributes in this list.

Remarks

This routine can be a more efficient mechanism to retrieve values from many attributes than calling one of the AFAttribute.GetValue Overload methods individually. This method achieves efficiency by reducing the number of round-trips to the associated server to read the data. The data will always be returned in the DefaultUOM of the respective attribute. Each returned AFValue will have its Attribute property set to the AFAttribute associated with the value.
Important note Important
Once a value has been added to a case's result set, either through one of the AFCase.AddInput Overload methods or by setting its value with an AFCase context, then subsequent calls to GetValue with the same case context will not invoke the data reference but return the stored result value.

Version Information

AFSDK


See Also

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