PIPointList.LoadAttributesAsync Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
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: TaskReturns a task.
Exceptions
| Exception | Condition |
|---|---|
| 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.
| 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. |