Quantcast
Channel: Manufacturing DevBlog
Viewing all articles
Browse latest Browse all 516

Activate ActiveX based BrowserPane

$
0
0

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

 


Viewing all articles
Browse latest Browse all 516

Trending Articles