Tool

From VisionaireWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

tool

Activates a tool in a toolbox.

The specified tool is inserted into the toolbox and activated.The toolbox must be the current default parent.

Lua Syntax:

tool(toolName, objectField, dataField [, param, filter], {flags=1, 
    params = {"string1","string2",...}, 
    clear = true|false, 
    activate = true|false})

Arguments

toolName

"string" - Name of the tool.

objectField

int - Field containing the objects which contain the data (optional, can be 0).

dataField

int - Field containing the data to edit.

param

"string" - Additional parameter, depends on tool you have specified with toolName.

filter

"string" - Specifies which objects can be selected into this tool.

Flags

pa/params

Additional parameters associated with argument 'param', each string should be of the form 'paramname=value'.

clr/clear

Specifies if activated tools should be deactivated or if they stay active. Default is true.

acv/activate

Specifies if this tool will be activated or not. Default is true.

Return Values

true
Tool successfully activated.
false
Invalid tool name.