PISDKCtrlDlg Library/Assembly


The PISDKCtrlDlg assembly is a shallow, native .NET wrapper around the most common PISDK COM controls and dialogs. Its sole purpose is to make .NET based development a little easier:


When to Use This Library


The classes and controls in this assembly can be used in place of the equivalent objects in PISDKCtl.ocx and PISDKDlg.dll.


How to Use This Library

Add a reference to PISDKCtrlDlg assembly (see instructions below), create an instance of a dialog class and use its methods like you would use the equivalent COM methods.

Add the user control to the VS.NET ToolBox and site it on a form (see instructions). Subscribe to control Events and set the Properties to suit the application needs.

The detailed documentation for the objects, methods, properties and events is provided in the sections for the corresponding COM objects.


The assembly contains the following components:


Connections class methods


    public Server Login(Server PIServer, string PIUser, string Password, bool Override, bool ForceShow)

    public Server Login2(Server PIServer, string PIUser, string Password, string MemberType, bool Override, bool ForceShow)

    public void ShowConnectionDialog(bool ReadOnly, short Modal)

    public void AllowCollectiveMemberOpen(bool AllowOpen)

    public bool ForceFailover(ByRef collective As Server, memberName As String) As Boolean

    public Server OpenPrimary(Server collective, string PIUser, string Password)


    Public Function Login( PIServer as Server, PIUser as String, Password as String, Override as Boolean, ForceShow as Boolean) as Server

    Public Function Login2(PIServer as Server, PIUser as String, Password as String, MemberType as String, bool Override, ForceShow as Boolean) as Server

    Public Sub ShowConnectionDialog(ReadOnly as Boolean, Modal as Integer)

    Public Sub AllowCollectiveMemberOpen(AllowOpen as Boolean)

    Public Function ForceFailover(ByRef collective As Server, memberName As String) As Boolean

    Public Function OpenPrimary(collective As Server, Optional PIUser As String,  Password As String) As Server


TagSearch class methods


    public PointList showTagSearch(string[] selectedServers, SearchOptions options)

    public PIAliasList2 showAliasSearch(Object searchContex, SearchOptions options)


    Public Function showTagSearch(selectedServers as String(), options as SearchOptions) as PointList

    Public Function showAliasSearch(searchContex as Object, options as SearchOptions) as PIAliasList2


ServPickList control



    public Server SelectedServer {get; set;}

    public bool ConnectOnSelect {get; set;}

    public String BuildDate {get; set;}

    public String version {get; set;}


    Public Property SelectedServer as Server

    Public Property ConnectOnSelect as Boolean

    Public Property BuildDate as String

    Public Property version as String




    public event PickListClickEventHandler picklistClick

    public event PickListKeyDownEventHandler picklistKDown

    public event PickListKeyUpEventHandler picklistKUp

    [Visual Basic]

    Public Event picklistClick as PickListClickEventHandler

    Public Event picklistKDown as PickListKeyDownEventHandler

    Public Event picklistKUp as PickListKeyUpEventHandler



Other features

This library doesn't provide the functionality of the ApplicationObject, so you need to create the classes directly. Please see the notes regarding creatable objects and version compatibility in the documentation for the PI-SDK Dialogs.



    Assembly: OSIsoft.PISDK.Controls.PISDKCtrlDlg (in OSIsoft.PISDK.Controls.PISDKCtrlDlg.dll)




How to use the library in VS.NET:


These instructions apply when the assembly is present in the Global Assembly Cache (GAC).

1. Create a new windows application with VS.NET.

2. Add a reference to the assembly (Project -> Add Reference -> locate and select OSIsoft.PISDK.Controls.COM -> press Select  -> Press OK). You can now create instances of the Connections and TagSearch classes and use them as their COM counterparts.


3. To use the Server PickList control, you need to add the OSIsoft.PISDK.Controls.ServPickList user control to the toolbox (right-click on the toolbar -> Add/Remove items -> scroll down the .NET Framework Components list/tab -> check ServPickList -> OK). You may may want to sort the toolbox items alphabetically, right-click the toolbox and select "sort....").

4. Click on the toolbox icon of the ServPickList control and place it on the form.



Enabling Operational Intelligence