Bcc.AddCommand({ TabName, GroupName, ButtonName, ButtonGroupName, CallbackFuncName, ButtonSize, ImageNameLarge, ImageNameSmall, ToolTip, ToolTip_2 })

Description

This function is utilized to add a button to the ribbon on any tab (or new tab) to fire the Lua script.

Parameters

The primary input of this function is a Table which can include the following keys:


  • TabName – The name of the ribbon tab the command button will be added to.
  • GroupName – The group box name that the button will be created inside
  • ButtonName – The text that will be displayed for the button in the ribbon
  • ButtonGroupName – When using medium or small buttons it’s recommended to utilize a button group for proper display purposes.  Any commands that have the same button group name will be placed in the same group.
  • CallbackFuncName – The function name that will be fired when the button is pressed
  • ButtonSize – The size of the button on the ribbon. Possible values are:
    • Large
    • Medium
    • Small
  • ImageNameLarge – The file name of the 32x32 PNG image used for display when the button state is large. If just using the filename, you must place this in an Image/32x32 folder in your plugin directory.  You may also specify the full path to the image.
  • ImageNameSmall - The file name of the 16x16 PNG image used for display when the button state is large. If just using the filename, you must place this in an Image/16x16 folder in your plugin directory.  You may also specify the full path to the image.
  • ToolTip – A tooltip that is displayed when the mouse is hovered over the button.
  • ToolTip_2 – A second line of tool tip that can be displayed.


Examples


Bcc.AddCommand({ TabName="My Tab", GroupName="My Group", ButtonName="My Button", CallbackFuncName="myFunction", ImageNameLarge="my_icon.png", ImageNameSmall="my_icon.png", ToolTip="My Tooltip" })