/// <summary> /// when [ActiveXBrowser] button is clicked /// </summary> /// <param name="Context"></param> /// <remarks></remarks> private void m_ActiveXBrowser_OnExecute(Inventor.NameValueMap Context) { //get active document Document oDoc = m_inventorApplication.ActiveDocument; //get the BrowserPanes BrowserPanes oPanes = default(BrowserPanes); oPanes = oDoc.BrowserPanes; //add the BrowserPane with the control BrowserPane oPane = default(BrowserPane); oPane = oPanes.Add("MyActiveXPane", "BrowserSample.UserControl1"); //get the control m_ActiveX = (UserControl1)oPane.Control; //call a method of the control m_ActiveX.DrawASketchRectangle(m_inventorApplication); //activate the BrowserPane oPane.Activate(); }