Maptitude GISDK Help

SetTool()

Summary

Sets the active tool item.

 

Changes

Addeds cursor parameter and options array in Version 2022.

 

Syntax

SetTool(string item_name [, string cursor] [, array otpions] )

 

Argument Contents
item_name The name of the tool item
cursor Sets the cursor for the tool

 

Option Type Contents
OnRun String A macro or a macro block to be run every time the tool would is activated
OnDone Integer A macro or a macro block to be run every time another tool is activated

 

Notes

Example

if method = 1 then SetTool("my edit tool")

else SetItem("my add tool")

 

 

// using onRUn and OnDone options with macro blocks

opts.OnRun = (do
                c = ClickCoord()
                ShowMessage("Action Block, Clicked Coordinate (" + i2s(c.lon) + "," + i2s(c.lat) +")")
            end)
opts.OnDone = (do
                ShowMessage("Action Block Leaving")
              end)
SetTool( "my tool","Arrow" , opts
)

 

Error Codes

Error Type Meaning
NotFound The specified item does not exist or is not in the current dialog box

 

See Also

Function Summary
GetTool() Gets the name of the active tool item
SetCursor() Sets the system pointer cursor style to one of several predefined options.

 

 

©2025 Caliper Corporation www.caliper.com