OPC Studio User's Guide and Reference
GetRoot Method (UANodeTreePosition)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.Graphs Namespace > UANodeTreePosition Class : GetRoot Method
Determines root of a tree to which the current tree position belongs.
Syntax
'Declaration
 
<NotNullAttribute()>
Public Function GetRoot() As UANodeTreePosition
'Usage
 
Dim instance As UANodeTreePosition
Dim value As UANodeTreePosition
 
value = instance.GetRoot()
[NotNull()]
public UANodeTreePosition GetRoot()
[NotNull()]
public:
UANodeTreePosition^ GetRoot(); 

Return Value

Returns a root position in this tree.

Because the OpcLabs.EasyOpc.UA.UANodeDescriptor has an implicit conversion from OpcLabs.EasyOpc.UA.AddressSpace.UANodeElement, you can simply use the returned OpcLabs.EasyOpc.UA.AddressSpace.UANodeElement in any place where OpcLabs.EasyOpc.UA.UANodeDescriptor is expected as input, and the corresponding node descriptor will be constructed automatically from the node element. When the implicit conversion operators are not supported (such as with Python.NET), you can use the OpcLabs.EasyOpc.UA.AddressSpace.UANodeElement.ToUANodeDescriptor static method instead.

This method never returns null (Nothing in Visual Basic).

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