Connectivity Software User's Guide and Reference
_DAItemDialog Interface
Members  Example 



OpcLabs.EasyOpcForms Assembly > OpcLabs.EasyOpc.DataAccess.Forms.Browsing.ComTypes Namespace : _DAItemDialog Interface
Exposes OpcLabs.EasyOpc.DataAccess.Forms.Browsing.DAItemDialog to COM clients.
Object Model
_DAItemDialog InterfaceEasyDAClientSelector ClassDANodeDescriptor ClassDANodeElement ClassServerDescriptor Class
Syntax
'Declaration
 
<CLSCompliantAttribute(False)>
<ComVisibleAttribute(True)>
<GuidAttribute("574447AC-4A29-45F6-9AD0-0093FB9170B4")>
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)>
Public Interface _DAItemDialog 
'Usage
 
Dim instance As _DAItemDialog
[CLSCompliant(false)]
[ComVisible(true)]
[Guid("574447AC-4A29-45F6-9AD0-0093FB9170B4")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface _DAItemDialog 
[CLSCompliant(false)]
[ComVisible(true)]
[Guid("574447AC-4A29-45F6-9AD0-0093FB9170B4")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface class _DAItemDialog 
Remarks

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

Example

COM

// 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 Visual Basic on GitHub: https://github.com/OPCLabs/Examples-ConnectivityStudio-VB .
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.

Private Sub ShowDialog_Main_Command_Click()
    OutputText = ""

    ' Instantiate the dialog object
    Dim itemDialog As New DAItemDialog
    Dim DialogResult
    DialogResult = itemDialog.ShowDialog
    
    itemDialog.serverDescriptor.ServerClass = "OPCLabs.KitServer.2"
    
    OutputText = OutputText & DialogResult & vbCrLf
    If DialogResult <> 1 Then   ' OK
        Exit Sub
    End If
    
    ' Display results
    OutputText = OutputText & itemDialog.nodeElement & vbCrLf
End Sub
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
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also