Show Method .Net Example (AliasSearch Object)


Add references to the OSISoft.PISDKDlg.dll, OSISoft.PISDKCommon.dll, and OSISoft.PISDK.dll interops.


Create a Module called Globals.vb with the following code.


Module Globals

   Friend AliasSearch As New PISDKDlg.AliasSearch 

End Module



Add a Form to the project.  Add a command button to the Form and call it Button1.  Add a ListView to the form and call it ListView1.



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

   Dim AliasList As PISDK.PIAliasList2
Dim Srv As PISDK.Server
Dim lOptions As Long

   'Disabling the search context will not only disable the search context,
   'it will also allow only the server or the module that is specified by
   'the context to be browsed.

   lOptions = PISDKDlg.TagSearchOptions.tsoptDisableSearchContext
   Srv = gPISDK.Servers.DefaultServer
   AliasList = AliasSearch.Show(Srv, lOptions)

End Sub


Enabling Operational Intelligence