- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone,
I'm trying to add a costume panel to the tools tab in drawing document ribbon for my add-inand keep getting and error.
The line that throws the error is marked below with an arrow
note: I have used the same lines to add a panel to part and assembly document ribbons and it worked just fine.
Thanks
' Get the ribbon.
Dim drawingRibbon As Inventor.Ribbon = g_inventorApplication.UserInterfaceManager.Ribbons.Item("Drawing")
' Get the "Tools" tab.
Dim drawingtoolstab As Inventor.RibbonTab = partRibbon.RibbonTabs.Item("id_TabTools")
' Check to see if the "MySample" panel already exists and create it if it doesn't.
Dim customPanel_drawing As Inventor.RibbonPanel = Nothing
Try
customPanel_drawing = drawingRibbon.RibbonPanels.Item("MySample")
Catch ex As Exception
End Try
If customPanel_drawing Is Nothing Then
'Create a New panel.
customPanel_drawing = drawingtoolstab.RibbonPanels.Add("Sample", "MySample", g_addInClientID) <-------
End If
Solved! Go to Solution.

