OPC Studio User's Guide and Reference
BrowseAreas Method (_EasyAEClient)
Example 



OpcLabs.EasyOpcClassic Assembly > OpcLabs.EasyOpc.AlarmsAndEvents.ComTypes Namespace > _EasyAEClient Interface : BrowseAreas Method
Name of the machine. Determines the computer on which the OPC server is located. It may be an empty string, in which case the OPC server is assumed to exist on the local computer or at the computer specified for it by DCOM configuration.
Contains ProgID of the OPC server.
Fully qualified name of the parent area to be browsed (empty string for root)
Browses the specified area for child areas. Uses computer name and server class for specifying the OPC server. A parent area is passed in. No filtering.
Syntax
'Declaration
 
<ElementsNotNullAttribute()>
<NotNullAttribute()>
Function BrowseAreas( _
   ByVal machineName As String, _
   ByVal serverClass As String, _
   ByVal parentQualifiedName As String _
) As AENodeElementCollection
'Usage
 
Dim instance As _EasyAEClient
Dim machineName As String
Dim serverClass As String
Dim parentQualifiedName As String
Dim value As AENodeElementCollection
 
value = instance.BrowseAreas(machineName, serverClass, parentQualifiedName)
[ElementsNotNull()]
[NotNull()]
AENodeElementCollection BrowseAreas( 
   string machineName,
   string serverClass,
   string parentQualifiedName
)

Parameters

machineName
Name of the machine. Determines the computer on which the OPC server is located. It may be an empty string, in which case the OPC server is assumed to exist on the local computer or at the computer specified for it by DCOM configuration.
serverClass
Contains ProgID of the OPC server.
parentQualifiedName
Fully qualified name of the parent area to be browsed (empty string for root)

Return Value

The method returns a keyed collection of OpcLabs.EasyOpc.AlarmsAndEvents.AddressSpace.AENodeElement values, each containing information about a particular area found. The keys of the keyed collection are the names of the areas.
Example

COM

Rem This example shows how to obtain all areas directly under the root (denoted by empty string for the parent).
Rem
Rem Find all latest examples here : https://opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Latest/examples.html .

Option Explicit

Dim Client: Set Client = CreateObject("OpcLabs.EasyOpc.AlarmsAndEvents.EasyAEClient")
On Error Resume Next
Dim NodeElements: Set NodeElements = Client.BrowseAreas("", "OPCLabs.KitEventServer.2", "")
If Err.Number <> 0 Then
    WScript.Echo "*** Failure: " & Err.Source & ": " & Err.Description
    WScript.Quit
End If
On Error Goto 0

Dim NodeElement: For Each NodeElement In NodeElements
    WScript.Echo "NodeElements(""" & NodeElement.Name & """):"
    With NodeElement
        WScript.Echo Space(4) & ".QualifiedName: " & .QualifiedName
    End With
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