Reorder browser pane nodes

<?xml encoding=”UTF-8″>By Adam Nagy

In the UI you can drag&drop some of the nodes in the Browser Pane to reorder them. You can do the same through the API. This sample swaps the order of the first two relationships in the assembly:

Sub ReorderConstraints()
Dim doc As Document
Set doc = ThisApplication.ActiveDocument
Dim bp As BrowserPane
Set bp = doc.BrowserPanes("AmBrowserArrangement")
' "Relationships" node
Dim rs As BrowserNode
Set rs = bp.TopNode.BrowserNodes(1)
Dim bn1 As BrowserNode
Set bn1 = rs.BrowserNodes(1)
Dim bn2 As BrowserNode
Set bn2 = rs.BrowserNodes(2)
Dim bn2d As BrowserNodeDefinition
Set bn2d = bn2.BrowserNodeDefinition
Call bp.Reorder(bn1, True, bn2)
Call bp.Update
End Sub

Reorder

 


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading