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

AF SDK Reference

AFElement.GetAttributeValues Method (PISystem, IList(AFAttributeValueQueryID), Object, Boolean, WindowsIdentity)

AFElement.GetAttributeValues Method (PISystem, IList(AFAttributeValueQueryID), Object, Boolean, WindowsIdentity)

  • Last UpdatedNov 18, 2025
  • 4 minute read
AFElement.GetAttributeValues Method (PISystem, IList(AFAttributeValueQueryID), Object, Boolean, WindowsIdentity)
This method gets a collection of AFValue objects for the specified attributes. The collection will be the same length and in the same order as the objectIds collection.

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

Syntax

public static IList<AFValue> GetAttributeValues(
	PISystem system,
	IList<AFAttributeValueQueryID> objectIds,
	Object queryDate = null,
	bool useSandbox = false,
	WindowsIdentity userIdentity = null
)
Public Shared Function GetAttributeValues ( 
	system As PISystem,
	objectIds As IList(Of AFAttributeValueQueryID),
	Optional queryDate As Object = Nothing,
	Optional useSandbox As Boolean = false,
	Optional userIdentity As WindowsIdentity = Nothing
) As IList(Of AFValue)

Dim system As PISystem
Dim objectIds As IList(Of AFAttributeValueQueryID)
Dim queryDate As Object
Dim useSandbox As Boolean
Dim userIdentity As WindowsIdentity
Dim returnValue As IList(Of AFValue)

returnValue = AFElement.GetAttributeValues(system, 
	objectIds, queryDate, useSandbox, 
	userIdentity)
public:
static IList<AFValue^>^ GetAttributeValues(
	PISystem^ system, 
	IList<AFAttributeValueQueryID>^ objectIds, 
	Object^ queryDate = nullptr, 
	bool useSandbox = false, 
	WindowsIdentity^ userIdentity = nullptr
)
static member GetAttributeValues : 
        system : PISystem * 
        objectIds : IList<AFAttributeValueQueryID> * 
        ?queryDate : Object * 
        ?useSandbox : bool * 
        ?userIdentity : WindowsIdentity 
(* Defaults:
        let _queryDate = defaultArg queryDate null
        let _useSandbox = defaultArg useSandbox false
        let _userIdentity = defaultArg userIdentity null
*)
-> IList<AFValue> 

Parameters

system
Type: OSIsoft.AFPISystem
The PISystem to search for the desired objects.
objectIds
Type: System.Collections.GenericIListAFAttributeValueQueryID
The list of AFAttributeValueQueryID to be found. If , then this method does nothing.
queryDate (Optional)
Type: SystemObject
The query date used to load the objects. Specify or AFTime.MaxValue for most recent versions of the objects. 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 AFTime.Now.
useSandbox (Optional)
Type: SystemBoolean
Specify whether to search for values in the sandbox. If set to false, only values in permanent storage will be returned.
userIdentity (Optional)
Type: System.Security.PrincipalWindowsIdentity
The WindowsIdentity of the user for the security rights to be checked. Only domain accounts or local accounts on the PI AF Server are supported by this method.

Return Value

Type: IListAFValue
Returns all AFValue objects found for the specified attributes.

Remarks

The returned collection will be the same length and order as the specified objectIds. If the attribute is not found, the value at that index will be null. If useSandbox is false and the attribute is dynamic, it will still be evaluated based on the sandbox value.

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

See Also

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