New Ribbon Tab in VB.NET
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Struggling newbie. I can't get a new ribbon tab to display. Using Inventor 2015 (trial for the moment), Visual Basic 2010 Express.
Whatever else I might be doing wrong, I don't understand the ClientId that the RibbonTabs.Add asks for. I found the ClassId and ClientId in the .addin file. I also found the Guid number in the AssemblyInfo.vb file. None of these seemed to work.
Compile is normal, com visibility is checked, addin shows as loaded in Inventor addin list, Messagebox in the TRY is correctly displaying the object type.(50424832)
Will the tab display before it is populated with a panel?
#Region "ApplicationAddInServer Members"
Public Sub Activate(ByVal addInSiteObject As Inventor.ApplicationAddInSite, ByVal firstTime As Boolean) Implements Inventor.ApplicationAddInServer.Activate
m_inventorApplication = addInSiteObject.Application
If firstTime = True Then
'Get ZeroDocRibbon object
Dim Ribbon As Inventor.Ribbon
Ribbon = m_inventorApplication.UserInterfaceManager.Ribbons.Item("ZeroDoc")
'Add VC Tab to ZeroDoc Ribbon
Dim oTabZeroDoc As Inventor.RibbonTab
Try
oTabZeroDoc = Ribbon.RibbonTabs.Add("Vac-Con", "id_VCZDTab", _
"{8ed71b22-8b81-4ab9-8d27-1e8774c0ae19}", _
"id_TabTools", False, False)
oTabZeroDoc.Visible = True
MsgBox(oTabZeroDoc.Type)
Catch ex As Exception
MsgBox("ZeroDoc Tab not created")
End Try
End If
End Sub