Activate ActiveX based BrowserPane

<?xml encoding=”UTF-8″>In Inventor 2018 custom browser panes got their own dockable window so that they can be moved around by the user.

As a result your old code that was creating your new ActiveX based BrowserPane and was trying to activate it does not work anymore.
You need to find the DockableWindow that was created for your BrowserPane and make that visible – this action will also make it active:

Public Sub BrowserTest()
Dim partDoc As PartDocument
Set partDoc = ThisApplication.ActiveDocument
Dim myBrowserPane As BrowserPane
Set myBrowserPane = partDoc.BrowserPanes.Add("Test", "WMPlayer.OCX")
' First you have to make its container visible
Dim uiMgr As UserInterfaceManager
Set uiMgr = ThisApplication.UserInterfaceManager
Dim dockWindow As DockableWindow
Set dockWindow = uiMgr.DockableWindows(myBrowserPane.Name)
' This will also activate it
dockWindow.Visible = True
End Sub

This will achieve the same as clicking the + button in the UI and selecting your browser pane that way:

Browserpane

 


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

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

Continue reading