Base Class: None
Derived Classes: None
Description
Allows control from a script of LUSAS Modeller's command toolbar buttons. Note that LUSAS Modeller will remember the previous state of toolbar buttons from one session to another, so some care must be taken to check the current state before adding buttons (or a new button will be added each time the script is run) Toolbars are named, but buttons are numbered. Toolbar names can be any arbitary string that is not already used as a toolbar name. Button numbering starts at 1, and refers to the index in the customise toolbar dialog
Example
' define toolbar if not already exists
if not toolbars.existsToolbar("Test") then call toolbars.createToolbar("Test")
' add remove button if not already defined
if not toolbars.buttonPresent(1) then call toolbars.addButton("Test",1)
' Set the command to be issued when the button is pressed
call toolbars.setCommand(1,"view.setZoom(50)")
' Display toolbar
call toolbars.showToolbar("Test",True)
Available Functions:
Back to Overview