PIPoint.FindPIPointsAsync Method (PIServer, IList(IEnumerable(PIPointQuery)), IEnumerable(String), CancellationToken)
- Last UpdatedSep 18, 2024
- PI System
- AF SDK 2024
- Developer
Find an enumerable list of PIPoint objects that match the specified list of
query filter conditions ORed together.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.0.1156
Syntax
public static Task<IEnumerable<PIPoint>> FindPIPointsAsync( PIServer piServer, IList<IEnumerable<PIPointQuery>> queries, IEnumerable<string> attributeNames = null, CancellationToken cancellationToken = default )
Public Shared Function FindPIPointsAsync ( piServer As PIServer, queries As IList(Of IEnumerable(Of PIPointQuery)), Optional attributeNames As IEnumerable(Of String) = Nothing, Optional cancellationToken As CancellationToken = Nothing ) As Task(Of IEnumerable(Of PIPoint)) Dim piServer As PIServer Dim queries As IList(Of IEnumerable(Of PIPointQuery)) Dim attributeNames As IEnumerable(Of String) Dim cancellationToken As CancellationToken Dim returnValue As Task(Of IEnumerable(Of PIPoint)) returnValue = PIPoint.FindPIPointsAsync(piServer, queries, attributeNames, cancellationToken)
public: static Task<IEnumerable<PIPoint^>^>^ FindPIPointsAsync( PIServer^ piServer, IList<IEnumerable<PIPointQuery>^>^ queries, IEnumerable<String^>^ attributeNames = nullptr, CancellationToken cancellationToken = CancellationToken() )
static member FindPIPointsAsync : piServer : PIServer * queries : IList<IEnumerable<PIPointQuery>> * ?attributeNames : IEnumerable<string> * ?cancellationToken : CancellationToken (* Defaults: let _attributeNames = defaultArg attributeNames null let _cancellationToken = defaultArg cancellationToken new CancellationToken() *) -> Task<IEnumerable<PIPoint>>
Parameters
- piServer
- Type: OSIsoft.AF.PI.PIServer
The PIServer to search for the desired PIPoint objects. - queries
- Type: System.Collections.Generic.IList<IEnumerable<PIPointQuery>>
Each inner lists of PIPoint attribute query filters are ANDed together to find the desired PIPoint objects. The results of each of the inner lists are ORed together to return the complete list. The FindPIPoints(PIServer, String, Boolean, IEnumerable<String> , AFSearchTextOption) method can be used to parse a string query and generate this list of queries. - attributeNames (Optional)
- Type: System.Collections.Generic.IEnumerable<String>
The list of PIPoint attribute names to be loaded from the server as the PIPoint objects are found. The list of PIPoint attribute names can be obtained from the PIPointClass.GetAttributes method or the PICommonPointAttributes class. The GetAttribute(String) method can be used to access the loaded attribute values. If null, then no attribute values are loaded for the returned PIPoints. - cancellationToken (Optional)
- Type: System.Threading.CancellationToken
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<IEnumerable<PIPoint>>Returns a task whose result is the enumerable list of PIPoint objects matching the specified queries.
Exceptions
Exception | Condition |
---|---|
AggregateException | Asynchronous methods throw AggregateException on failure which will contain one or more exceptions containing the failure. |
Remarks
This method finds an enumerable list of PIPoint objects from the specified list of query filter conditions ORed together. The conditions within each inner list are ANDed together. If the conditions are mutually exclusive, then nothing will be returned. See PIPoint Query Syntax for a more information on the query syntax.
The points are returned from the server in blocks as the client is iterating through the list. When you stop iterating the returned list, the remaining points are not retrieved from the server.
![]() |
---|
A PI Point attribute may only be referenced one time per FindPIPoints call. Referencing a PI Point attribute multiple times will result in an error. |
![]() |
---|
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. |