Visavi Visual OPC .NET  

OpcConnection.Browse Method

Browses the root node of the OPC Server for all branches and leaves.

[Visual Basic]
 Overloads Public Function Browse( _
   String itemId, _
   BrowseFilter itemId, _
   String nameFilter, _
   String vendorFilter, _
   Boolean returnPropertyValues, _
   ByRef Integer() propertyIds _
) As IOpcBrowseElement()

[C#]
public IOpcBrowseElement[] Browse(
   string itemId ,
   BrowseFilter browseFilter ,
   string nameFilter ,
   string vendorFilter ,
   bool returnPropertyValues,
   ref int[] propertyIds
);

[C++]
public: IOpcBrowseElement __gc[] Browse( 
   String* itemId ,
   BrowseFilter* browseFilter ,
   String* nameFilter ,
   String* vendorFilter ,
   bool returnPropertyValues,
   [ref] int __gc[] propertyIds
);

[JScript]
public function Browse(
   itemId : String,
   browseFilter : BrowseFilter,
   nameFilter : String,
   vendorFilter : String,
   returnPropertyValues : bool,
   propertyIds : int[]
) : IOpcBrowseElement[]

Parameters

itemId
The Item ID representing the OPC item to be browsed.
browseFilter
A BrowseFilter indicating whether to browse for branches, leaves, or both.
nameFilter
The name filter for the browse. It is a wildcard string that conforms to the Visual Basic LIKE operator to filter element names. An empty string or null parameter implies no filtering.
vendorFilter
The vendor filter for the browse. It is a server specific, free format string. An empty string or null parameter implies no filtering.
returnPropertyValues
Indicates whether the property values should be returned along with the property names.
propertyIds
An array of properties to be returned with each element. If this value is null, all available properties are returned with each element.

Return Value

An array of IOpcBrowseElement objects that represent the branches and leaves for the OPC item specified by the itemId parameter.

Exceptions

Exception Type Condition
BrowseItemException An error occured while browsing the address space for this item. Examine the Message and InnerException properties to get a better understanding of the error's nature.

Remarks

The Browse method uses the browsing interfaces of the OPC Server to browse it's address space. For a better understanding of the heirarchical layout of OPC servers refer to the IOPCBrowse interface of the OPC DA Server Specification.

This overload will fill in the Properties property of the child elements.

Requirements

Platforms: Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

See Also

OpcConnection Interface OpcConnection Members | Visavi.Opc.Client Namespace