I don't have a vault installed but you could have a look at the following iLogic rule. Select a node in the vault browser and run the rule. It will find all browsers and log the selected node (if one is found)
Dim doc As PartDocument = ThisDoc.Document
For Each browserPane As BrowserPane In doc.BrowserPanes
logger.Info(browserPane.Name & " - " & browserPane.InternalName)
Dim topNode As BrowserNode = Nothing
Try
topNode = browserPane.TopNode
Catch ex As Exception
logger.Info(" None top node found.")
Continue For
End Try
Dim selectedNode = GetSelectedNode(topNode)
If (selectedNode IsNot Nothing) Then
logger.Info(" " & selectedNode.BrowserNodeDefinition.Label)
Else
logger.Info(" None selected node found")
End If
Next
logger.Info("- - - - - - or if you know the internal name of the browser - - - - - - - - -")
Dim browser = doc.BrowserPanes.Item("PmDefault")
Dim selectedNodeInBrowser = GetSelectedNode(browser.TopNode)
If (selectedNodeInBrowser IsNot Nothing) Then
logger.Info(selectedNodeInBrowser.BrowserNodeDefinition.Label)
Else
logger.Info("None selected node found")
End If
End Sub
Public Function GetSelectedNode(node As BrowserNode) As BrowserNode
If (node.Selected) Then Return node
For Each refNode As BrowserNode In node.BrowserNodes
Dim selectedNode = GetSelectedNode(refNode)
If (selectedNode IsNot Nothing) Then
Return selectedNode
End If
Next
Return Nothing
End Function
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Blog: hjalte.nl - github.com