AnsweredAssumed Answered

PI Points Search - AF SDK

Question asked by Bhikadiya Champion on Jul 28, 2016
Latest reply on Aug 24, 2016 by Bhikadiya

Hi, This is regarding searching PI points based on a) Point Source and b) Point Creation Date Attributes.


The requirement is to find the PI Points which were created say in last 2 days and by point source,


See below snippet


'Connecting to PI Server

  Dim vPIServers As New PIServers()

                Dim vSourcePIServer As PIServer = vPIServers("PISERVER_01")

                Console.WriteLine("Connected To PI Server")



  'Define the search criteria

                Dim pointqArray As List(Of PIPointQuery) = New List(Of PIPointQuery)

                Dim vpointQuery As PIPointQuery


  'For Point Source Filter

                vpointQuery = New PIPointQuery(PICommonPointAttributes.PointSource, Search.AFSearchOperator.Equal, "OPC_TEST")



  'For Creation Date Filter

                vpointQuery = New PIPointQuery(PICommonPointAttributes.CreationDate, Search.AFSearchOperator.Equal, "07/01/2016")




                Dim pointFilter As IEnumerable(Of PIPointQuery) = pointqArray

                Dim vPIPointList As IEnumerable(Of PIPoint)

                vPIPointList = PIPoint.FindPIPoints(vSourcePIServer, pointqArray, Nothing)


                Dim vTotalPointsFound As Integer = vPIPointList.Count

                Console.WriteLine("Total PI Points Found with PointSource " & vTotalPointsFound.ToString())


Notes: The point source filter criteria works fine. No Issue. I am not sure about searching tags by 'Creation Date'. Any thoughts ?


Your kind suggestions will truly appreciated. Thanks - Mukesh.