QuickOPC User's Guide and Reference
BrowseLeaves Method (_EasyDAClient)
Example 



OpcLabs.EasyOpcClassic Assembly > OpcLabs.EasyOpc.DataAccess.ComTypes Namespace > _EasyDAClient Interface : BrowseLeaves Method
Name of the machine (empty string for local computer).
Contains ProgID of the OPC server to browse.
ID of the parent branch to be browsed (empty string for root)
Browse for child leaves. Specify machine name, and server class.
Syntax
'Declaration
 
<ElementsNotNullAttribute()>
<NotNullAttribute()>
Function BrowseLeaves( _
   ByVal machineName As String, _
   ByVal serverClass As String, _
   ByVal parentItemId As String _
) As DANodeElementCollection
'Usage
 
Dim instance As _EasyDAClient
Dim machineName As String
Dim serverClass As String
Dim parentItemId As String
Dim value As DANodeElementCollection
 
value = instance.BrowseLeaves(machineName, serverClass, parentItemId)
[ElementsNotNull()]
[NotNull()]
DANodeElementCollection BrowseLeaves( 
   string machineName,
   string serverClass,
   string parentItemId
)
[ElementsNotNull()]
[NotNull()]
DANodeElementCollection^ BrowseLeaves( 
   String^ machineName,
   String^ serverClass,
   String^ parentItemId
) 

Parameters

machineName
Name of the machine (empty string for local computer).
serverClass
Contains ProgID of the OPC server to browse.
parentItemId
ID of the parent branch to be browsed (empty string for root)

Return Value

The method returns a keyed collection of OpcLabs.EasyOpc.DataAccess.AddressSpace.DANodeElement values, each containing information about a particular leaf found. The keys of the keyed collection are the names of the leaves.
Exceptions
ExceptionDescription
An error has occurred during application execution.
Example

COM

Rem This example shows how to obtain all leaves under the "Simulation" branch of the address space. For each leaf, it displays 
Rem the ItemID of the node.

Option Explicit

Dim Client: Set Client = CreateObject("OpcLabs.EasyOpc.DataAccess.EasyDAClient")
On Error Resume Next
Dim LeafElements: Set LeafElements = Client.BrowseLeaves("", "OPCLabs.KitServer.2", "Simulation")
If Err.Number <> 0 Then
    WScript.Echo "*** Failure: " & Err.Source & ": " & Err.Description
    WScript.Quit
End If
On Error Goto 0

Dim LeafElement: For Each LeafElement In LeafElements
    WScript.Echo "LeafElements(""" & LeafElement.Name & """).ItemId: " & LeafElement.ItemId
Next
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