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

AF SDK Reference

PIPointList.LoadAttributesAsync Method

  • Last UpdatedNov 18, 2025
  • 3 minute read
PIPointList.LoadAttributesAsync Method
Load PIPoint attributes into the cache for each PIPoint in the list.

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

Syntax

public Task LoadAttributesAsync(
	string[] names,
	CancellationToken cancellationToken = default
)
Public Function LoadAttributesAsync ( 
	names As String(),
	Optional cancellationToken As CancellationToken = Nothing
) As Task

Dim instance As PIPointList
Dim names As String()
Dim cancellationToken As CancellationToken
Dim returnValue As Task

returnValue = instance.LoadAttributesAsync(names, 
	cancellationToken)
public:
Task^ LoadAttributesAsync(
	array<String^>^ names, 
	CancellationToken cancellationToken = CancellationToken()
)
member LoadAttributesAsync : 
        names : string[] * 
        ?cancellationToken : CancellationToken 
(* Defaults:
        let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task 

Parameters

names
Type: SystemString
The list of PIPoint attribute names to be loaded. The PICommonPointAttributes class contains some of the common PIPoint attribute names.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
A cancellation token used to abort processing before completion. Passing the default CancellationToken.None will run to completion or until the PIConnectionInfo.OperationTimeOut period elapses.

Return Value

Type: Task
Returns a task.

Exceptions

ExceptionCondition
AggregateException Asynchronous methods throw AggregateException on failure which will contain one or more exceptions containing the failure.

Remarks

The PIPoint attribute values for the specified list of attributes and points are loaded from the server into the client's cache. After loading, the PIPoint.GetAttribute method can be used to read the PIPoint attribute value. When the PIPoint attributes are no longer needed, the UnloadAttributes(String) method or the UnloadAllAttributes(String) method can be called to remove the PIPoint attributes from the cache and free memory. Beginning in AF 2.6, the LoadAttributes method will not unload previously loaded PIPoint attributes.

Note Notes to Callers
This call might use a background task to complete some of its work. See the Threading Overview for some matters to consider when execution transitions to another thread.

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

See Also

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