Hello, everyone. What should I do if there are more than 3 buttons in the toolbar made by SW API and the last one cannot be displayed?The procedures for the modification are as follows:
For Each doctype As Integer In docTypes
Dim cmdtab As ICommandTab = iCmdMgr.GetCommandTab(doctype, Title)
Dim bresult As Boolean
If Not cmdtab Is Nothing And Not getDataResult Or ignorePrevious Then 'if tab exists, but we have ignored the registry info, re-create the tab. otherwise the ids won't matchup and the tab will be blank
Dim res As Boolean = iCmdMgr.RemoveCommandTab(cmdtab)
cmdtab = Nothing
End If
If cmdtab Is Nothing Then
cmdtab = iCmdMgr.AddCommandTab(doctype, Title)
Dim cmdbox As CommandTabBox = cmdtab.AddCommandTabBox
Dim cmdids(4) As Integer
Dim texttype(4) As Integer
cmdids(0) = cmdGroup.CommandID(cmdIndex0)‘Create cube button
texttype(0) = swCommandTabButtonTextDisplay_e.swCommandTabButton_TextBelow
cmdids(1) = cmdGroup.CommandID(cmdIndex1)’ Show PMP button
texttype(1) = swCommandTabButtonTextDisplay_e.swCommandTabButton_TextBelow
cmdids(2) = cmdGroup.CommandID(cmdIndex2)‘ Show P1 button
texttype(2) = swCommandTabButtonTextDisplay_e.swCommandTabButton_TextBelow
cmdids(3) = cmdGroup.CommandID(cmdIndex3)’Show P2 button,No display after the button program runs
texttype(3) = swCommandTabButtonTextDisplay_e.swCommandTabButton_TextBelow
bresult = cmdbox.AddCommands(cmdids, texttype)
End If
Next