// This example shows how to let the user browse for an OPC Data Access item.
//
// Find all latest examples here: https://www.doc-that.com/files/onlinedocs/OPCLabs-ConnectivityStudio/Latest/examples.html .
// OPC client and subscriber examples in Object Pascal (Delphi) on GitHub: https://github.com/OPCLabs/Examples-ConnectivityStudio-OP .
// Missing some example? Ask us for it on our Online Forums, https://forum.opclabs.com/forum/index ! You do not have to own
// a commercial license in order to use Online Forums, and we reply to every post.
class procedure ShowDialog.Main;
var
ItemDialog: OpcLabs_EasyOpcForms_TLB._DAItemDialog;
begin
// Instantiate the dialog object
ItemDialog := CoDAItemDialog.Create;
ItemDialog.ServerDescriptor.ServerClass := 'OPCLabs.KitServer.2';
ItemDialog.ShowDialog(nil);
// Display results
WriteLn(ItemDialog.NodeElement.ToString);
end;
Rem This example shows how to let the user browse for an OPC Data Access item.
Rem
Rem Find all latest examples here: https://www.doc-that.com/files/onlinedocs/OPCLabs-ConnectivityStudio/Latest/examples.html .
Rem OPC client and subscriber examples in VBScript on GitHub: https://github.com/OPCLabs/Examples-ConnectivityStudio-VBScript .
Rem Missing some example? Ask us for it on our Online Forums, https://forum.opclabs.com/forum/index ! You do not have to own
Rem a commercial license in order to use Online Forums, and we reply to every post.
Option Explicit
Const DialogResult_OK = 1
Dim ItemDialog: Set ItemDialog = CreateObject("OpcLabs.EasyOpc.DataAccess.Forms.Browsing.DAItemDialog")
ItemDialog.ServerDescriptor.ServerClass = "OPCLabs.KitServer.2"
Dim dialogResult: dialogResult = ItemDialog.ShowDialog
WScript.Echo dialogResult
If dialogResult <> DialogResult_OK Then
WScript.Quit
End If
' Display results
WScript.Echo "NodeElement: " & ItemDialog.NodeElement