Library.PICompressedDataNP

This property queries for PI compressed data using a start date, direction, and number of points.

This property is read only.

Syntax Parameters Return Value
ReadOnly Property Library.PICompressedDataNP( _
    Servers As Variant, _
    Users As Variant, _
    Pwds As Variant, _
    Tags As Variant, _
    StartDate As Variant, _
    NumPoints As Long, _
    Direction As Long, _
    Bdry As Long, _
    FilterExpr As String, _
    Show As Long, _
    GoodOnly As Boolean, _
    MergeResults As Boolean, _
    Optional IsComplete As Boolean = True) As Spreadsheet
  • Servers [in]

Type: Variant

  • Users [in]

Type: Variant

  • Pwds [in]

Type: Variant

  • Tags [in]

Type: Variant

  • StartDate [in]

Type: Variant

  • NumPoints [in]

Type: Long

  • Direction [in]

Type: Long

  • Bdry [in]

Type: Long

  • FilterExpr [in]

Type: String

  • Show [in]

Type: Long

  • GoodOnly [in]

Type: Boolean

  • MergeResults [in]

Type: Boolean

  • IsComplete [in,optional]

Type: Boolean

Default value: True

Spreadsheet

SVB Example

Querying data from PI databases:

Option Base 1
Option Explicit
Sub Main
    Dim ss As Spreadsheet
    Set ss = Application.PICompressedData("piserver","pidemo","""","BA:ACTIVE.1","9/16/2013 5:14:55 PM","9/17/2013 5:15:03 PM",3,"",0,True,False)
    ss.Visible = True

    'Query for PI compressed data using a start date, direction, and number of points
    Dim ss2 As Spreadsheet
    Set ss2 = Application.PICompressedDataNP("piserver","pidemo","""","BA:ACTIVE.1","9/16/2013 5:18:34 PM",10,0,3,"",0,True,False)
    ss2.Visible = True

    'Query for PI interpolated data using a date range and a number of observations
    Dim ss3As Spreadsheet
    Set ss3As = PIInterpolatedDataObs("piserver","pidemo","""","BA:ACTIVE.1","9/10/2013 5:20:34 PM","9/17/2013 5:20:34 PM",10,"",0,True)
    ss3As .Visible = True

    'Query for PI summaries data using a date range and a number of observations
    Dim ss4 As Spreadsheet
    Set ss4 = Application.PISummariesDataObs("piserver","pidemo","""","BA:ACTIVE.1","9/15/2013 5:32:16 PM","9/17/2013 5:32:16 PM",50,5,2,True)
    ss4.Visible = True

    'Query for PI snapshot data as it is added to the system
    Application.PISnapshotData("piserver","pidemo","""","BA:ACTIVE.1",1000,5,True)
    Wait 22
    Dim ss5 As Spreadsheet
    Set ss5 = PIStopSnapshotData()
    ss5 .Visible = True
End Sub