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

AF SDK Reference

IAFDataProvider.TryGetItem Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
IAFDataProvider.TryGetItem Method
Acquires a cache-enabled AFData instance if one is available.

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

Syntax

bool TryGetItem(
	AFAttribute key,
	out AFData cachedData
)
Function TryGetItem ( 
	key As AFAttribute,
	<OutAttribute> ByRef cachedData As AFData
) As Boolean

Dim instance As IAFDataProvider
Dim key As AFAttribute
Dim cachedData As AFData
Dim returnValue As Boolean

returnValue = instance.TryGetItem(key, 
	cachedData)
bool TryGetItem(
	AFAttribute^ key, 
	[OutAttribute] AFData^% cachedData
)
abstract TryGetItem : 
        key : AFAttribute * 
        cachedData : AFData byref -> bool 

Parameters

key
Type: OSIsoft.AF.AssetAFAttribute
The attribute to get an AFData instance for.
cachedData
Type: OSIsoft.AF.DataAFData
The AFData instance.

Return Value

Type: Boolean
True if a cache-enabled AFData instance was found, otherwise false.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7

See Also

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