Message 1 of 1
[iLogic / VBA ] Sort SkecthBlockDefinitions nodes on browser
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everybody,
I was trying to make a rule for sorting sketchblocksdefinitions on browser, yet it looks a little bit confusing for me dealing with...even tho it looked easy on the first moment... 😅
Here's the code i was thinking to implement:
Sub Main()
Dim oDoc As PartDocument = ThisApplication.ActiveDocument Dim oBp As BrowserPane oBp = oDoc.BrowserPanes("PmDefault") Dim oBn As BrowserNode oBn = oBp.TopNode.BrowserNodes("Blocks") Dim oBn1 As BrowserNode = oBn.BrowserNodes(1) Dim oBn2 As BrowserNode = oBn.BrowserNodes(2) oBp.Reorder(oBn1, True, oBn2)
End sub
For me it seems like Inventor doesnt allow to move them.
I'm guessing this because mannually it is not possible and if I change the order of oBn1 and oBn2 OR if i change the bool value to false wich would make the code run through itself with no changes in the browser.
Does anyone have done something like this before?
Thanks.