PixxUI.PISummaryData

Description

Query for PI summary data

Parameters

App As Application

Passwords() As String

StopDate As Variant

Servers() As String

Tags() As String

Smry As ArchiveSummaryTypeConstants

Users() As String

StartDate As Variant

CalcBasis As CalculationBasisConstants

Return Value

Result As Spreadsheet

SVB Example

' References required

' PixxAddin 1.0 Type Library (1.0)

' PISDK 1.3 Type Library (1.0)

' PISDKCommon 1.0 Type Library (1.0)

 

Option Base 1

Const g_nTags = 5

Sub Main

Dim PiConn As PixxUI

Set PiConn = AddIns.AddIn("PixxAddin.PixxUI.1")

 

Dim aServers(g_nTags) As String

Dim aUsers(g_nTags) As String

Dim aPwds(g_nTags) As String

 

Dim nItem As Integer

For nItem = 1 To g_nTags

 

aServers(nItem) = "PISERVER"

aUsers(nItem) = "piadmin"

aPwds(nItem) = ""

 

Next nItem

 

Dim aTags(g_nTags) As String

 

aTags(1) = "BA:ACTIVE.1"

aTags(2) = "BA:TEMP.1"

aTags(3) = "BA:CONC.1"

aTags(4) = "BA:LEVEL.1"

aTags(5) = "BA:PHASE.1"

 

Dim s As Spreadsheet

 

On Error Resume Next

 

Set s = PiConn.PISummaryData(Application,aServers,aUsers,aPwds,aTags,"y","t",astCount,cbTimeWeighted)

 

If Err.Number <> 0 Then

MsgBox Err.Description

Exit Sub

End If

 

s.Visible = True

 

End Sub