Application.PISnapshotData

This property queries for PI snapshot data as it is added to the system.

This property is read only.

Syntax Parameters Return Value
ReadOnly Property Application.PISnapshotData( _
    Servers As Variant, _
    Users As Variant, _
    Pwds As Variant, _
    Tags As Variant, _
    MaxEvent As Long, _
    PollSec As Long, _
    GoodOnly As Boolean)
  • Servers [in]

Type: Variant

  • Users [in]

Type: Variant

  • Pwds [in]

Type: Variant

  • Tags [in]

Type: Variant

  • MaxEvent [in]

Type: Long

  • PollSec [in]

Type: Long

  • GoodOnly [in]

Type: Boolean

This property does not return a value.

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