BrowserPanes.

BrowserPanes.

Anonymous
Not applicable
360 Views
1 Reply
Message 1 of 2

BrowserPanes.

Anonymous
Not applicable
Can someone tell me how to add a BrowserPane in a simple way?
The sample does only explain how to use a Form that contain the ocx file.
I have already created a "Add-in" that I would like to add a ocx
(calculator) in the BrowserPane without any Forms if possible.

Lars Andersson
0 Likes
361 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Det här kanske kan hjälpa... 🙂


Option Explicit

Implements ApplicationAddInServer

Private oApp As Inventor.Application
Private oDoc As Inventor.Document

Private WithEvents oAppEvents As ApplicationEvents

Private oPane1 As BrowserPane
Private oPane As BrowserPane
Private WithEvents MyMenu As MyMenu.MyMNU

Private Sub ApplicationAddInServer_Activate(ByVal AddInSiteObject As Inventor.ApplicationAddInSite, ByVal FirstTime As Boolean)
Set oApp = AddInSiteObject.Application
Set oAppEvents = oApp.ApplicationEvents

If frmRegister.CheckRegistration = False Then
Exit Sub
Else

Set oApp = GetObject(, "Inventor.Application")
On Error Resume Next

Dim tf As Boolean
tf = True


For Each oPane In oApp.ActiveEditObject.BrowserPanes
If oPane.Name = "My-Pane" Then
Exit Sub
End If
Next oPane

Set oPane = oApp.ActiveEditObject.BrowserPanes.Add("My-Pane", "MyMenu.MyMNU")
Set MyMenu = oPane.Control
End If
End Sub

Private Sub ApplicationAddInServer_Deactivate()
On Error Resume Next
Set oPane = Nothing
Set MyMenu = Nothing
Set oDoc = Nothing
Set oApp = Nothing
Unload Me
End Sub

Private Property Get ApplicationAddInServer_Automation() As Inventor.AddInAutomation

End Property

Private Sub ApplicationAddInServer_ExecuteCommand(ByVal CommandID As Long)

End Sub

/
Emil Einarsson
CadCam-it
0 Likes