Community
Hello,
I´ve created a VB.NET AddIn that works as intended, but when I manually reload it, I get an unidentified Error.
Public Sub Activate([...])
[...]
If firstTime Then
AddToUserInterface()
End If
End Sub
Private Sub AddToUserInterface()
' Get the drawing ribbon.
Dim drawingRibbon As Ribbon = g_inventorApplication.UserInterfaceManager.Ribbons.Item("Drawing")
' Get the "Place Views" tab.
Dim PlaceViewsTab As RibbonTab = drawingRibbon.RibbonTabs.Item("id_TabPlaceViews")
' Create a new panel.
Dim PrintAddInPanel As RibbonPanel = PlaceViewsTab.RibbonPanels.Add("Print Service", "PrintAddInPanel", AddInClientID)
' Add buttons to Ribbon Panel.
PrintAddInPanel.CommandControls.AddButton(m_Print_PDF, False, True)
[...]
End Sub
I get the Error the line where I add my custom RibbonPanel.
What code do I need to add to make it work?
Do I need something in the Deactivate() Sub?
Thanks in advance.
Solved! Go to Solution.
Solved by striebel.sebastian. Go to Solution.
Never mind.
I figured it out by myself. Just add this to your code and everything works just fine.
Public Sub Deactivate() Implements Inventor.ApplicationAddInServer.Deactivate
PrintAddInPanel.Delete()
End Sub
Can't find what you're looking for? Ask the community or share your knowledge.