Maptitude GISDK Help |
Sets the active tool item.
Addeds cursor parameter and options array in Version 2022.
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 |
The specified item must be in the current dialog box.
This function may be called in the Init macro of a dialog box to set the tool item active when the dialog is initially displayed.
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 Type |
Meaning |
NotFound |
The specified item does not exist or is not in the current dialog box |
Function |
Summary |
Gets the name of the active tool item |
|
Sets the system pointer cursor style to one of several predefined options. |
©2025 Caliper Corporation | www.caliper.com |