I have a addin that has 4 different options to choose from on the menu. If the user wants to use the toolbar instead they only get 3 options and 2 Flyout boxes. The image below should have an "S" where the first flyout box is. Same thing for just s normal toolbar it only shows "C M A"
I can't figure out where in the code to control this ribbon.
Below is the code i have so far. I don't see where it's creating the ribbon or the flyout boxes for it.
Public Sub AddCommandMgr()
Dim cmdGroup As ICommandGroup
Dim iBmp As New BitmapHandler
Dim thisAssembly As Assembly
Dim cmdIndex0 As Integer, cmdIndex1 As Integer, cmdIndex2 As Integer, cmdIndex3 As Integer
Dim Title As String = "Material Selector"
Dim ToolTip As String = "Material Selector"
Dim docTypes() As Integer = {swDocumentTypes_e.swDocASSEMBLY, _
swDocumentTypes_e.swDocDRAWING, _
swDocumentTypes_e.swDocPART}
thisAssembly = System.Reflection.Assembly.GetAssembly(Me.GetType())
cmdGroup = iCmdMgr.CreateCommandGroup(1, Title, ToolTip, "", -1)
cmdGroup.LargeIconList = iBmp.CreateFileFromResourceBitmap("MaterialSelector.ToolbarLarge.bmp", thisAssembly)
cmdGroup.SmallIconList = iBmp.CreateFileFromResourceBitmap("MaterialSelector.CITToolbarSmall.bmp", thisAssembly)
cmdGroup.LargeMainIcon = iBmp.CreateFileFromResourceBitmap("MaterialSelector.MainIconLarge.bmp", thisAssembly)
cmdGroup.SmallMainIcon = iBmp.CreateFileFromResourceBitmap("MaterialSelector.MainIconSmall.bmp", thisAssembly)
cmdIndex0 = cmdGroup.AddCommandItem2("CreatePart", 0, "Create a Part", "Create Part", 0, "CreatePart", "", 0, swCommandItemType_e.swMenuItem)
cmdIndex1 = cmdGroup.AddCommandItem2("ModifyPart", 1, "Modify Currently opened part", "Modify Part", 1, "ModifyPart", "", 1, swCommandItemType_e.swMenuItem)
cmdIndex2 = cmdGroup.AddCommandItem2("AssemblyUpdater", 2, "Update assembly", "Updates Currently Opened Assembly", 2, "AssemblyUpdater", "", 2, swCommandItemType_e.swMenuItem)
cmdIndex3 = cmdGroup.AddCommandItem2("Setup", 3, "Setup", "Allows modifying data for a part type", 3, "ModifyData", "", 3, swCommandItemType_e.swMenuItem)
cmdGroup.HasToolbar = True
cmdGroup.HasMenu = True
cmdGroup.Activate()
For Each docType As Integer In docTypes
Dim cmdTab As ICommandTab = iCmdMgr.GetCommandTab(docType, Title)
Dim bResult As Boolean
If cmdTab Is Nothing Then
cmdTab = iCmdMgr.AddCommandTab(docType, Title)
Dim cmdBox As CommandTabBox = cmdTab.AddCommandTabBox
Dim cmdIDs(3) As Integer
Dim TextType(3) As Integer
cmdIDs(0) = cmdGroup.CommandID(cmdIndex0)
TextType(0) = swCommandTabButtonTextDisplay_e.swCommandTabButton_TextHorizontal
cmdIDs(1) = cmdGroup.CommandID(cmdIndex1)
TextType(1) = swCommandTabButtonTextDisplay_e.swCommandTabButton_TextHorizontal
cmdIDs(2) = cmdGroup.CommandID(cmdIndex2)
TextType(2) = swCommandTabButtonTextDisplay_e.swCommandTabButton_TextHorizontal
cmdIDs(3) = cmdGroup.ToolbarId
TextType(3) = swCommandTabButtonTextDisplay_e.swCommandTabButton_TextHorizontal
bResult = cmdBox.AddCommands(cmdIDs, TextType)
Dim cmdBox1 As CommandTabBox = cmdTab.AddCommandTabBox()
ReDim cmdIDs(1)
ReDim TextType(1)
cmdIDs(0) = cmdGroup.ToolbarId
TextType(0) = swCommandTabButtonTextDisplay_e.swCommandTabButton_TextBelow
bResult = cmdBox1.AddCommands(cmdIDs, TextType)
cmdTab.AddSeparator(cmdBox1, cmdGroup.ToolbarId)
End If
Next
thisAssembly = Nothing
iBmp.Dispose()
End Sub
What is causing this or where should I look to start changing how this is laid out?
SolidworksApi macros