Bcc.AddQuickAccessCommand
Bcc.AddQuickAccessCommand({ButtonType, ButtonName, CallbackFuncName, ImageNameSmall, ToolTip, [ToolTip_2] })
Description
This function is utilized to add a button to the Quick Access bar of ribbon within the BobCAD-CAM product to fire a Lua script.
Parameters
The primary input of this function is a Table which can include the following keys:
- ButtonType - Specify the type of item you want to add to the quick access bar.
- Omitting this key will default to creating a standard button.
- Regular - creates a standard button
- Separator - creates a vertical bar separator in the quick access bar.
- Toggle - creates a toggle button
- ButtonName – The text that will be displayed as the feature name in the tool tip
- 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
- 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
-- Add a button to the quick access bar that calls MyFunction
Bcc.AddQuickAccessCommand({ButtonName="Hello", CallbackFuncName="MyFunction", ImageNameSmall="image.png", ToolTip="Display this awesome tip!" })
-- Add a separator to the quick access bar for organization
Bcc.AddQuickAccessCommand({ButtonType="Separator"})
-- Add a toggle button to the quick access toolbar
Bcc.AddQuickAccessCommand({ButtonType="Toggle", ButtonName="Toggle Button", CallbackFuncName="SetTheMode", ImageNameSmall="image1.png", ToolTip="Enable cool mode"})