reference:scripting_reference:scripting_events:onaddbuttons

The OnAddButtons event can be implemented by a script add-in to add dynamic buttons to toolbars and menus. Scripts do this by adding new internal commands to Opus, specifying one or more arguments that are used to generate dynamic buttons.

For example, a function called Foo might have an argument BAR that's used to generate a number of buttons. When the user adds a toolbar button with the command Foo BAR, your script's OnAddButtons event would be called to generate dynamic buttons that are shown on the toolbar. Any buttons it creates will be displayed in place of the original button, and the original button will be hidden (except in Customize mode).

The arguments that generate dynamic buttons are specified when adding the custom command via the dynamic_args property of the ScriptCommand object.

Method Name: OnAddButtons

Argument Type:

AddButtonsData 

Return Type:

none

Description: