user manual

Appendix A: Controlling iTools from the IDL Command Line 381
iTool Developer’s Guide Retrieving an iTool Object Reference
Retrieving an iTool Object Reference
In order to change an existing iTool from the IDL command line (or from a non-iTool
routine), you must first retrieve an object reference to the iTool you wish to change.
Use the TOOL keyword to the ITGETCURRENT function to retrieve the object
reference to the currently-active iTool:
idTool = ITGETCURRENT(TOOL=oTool)
In this example, the variable idTool will contain the iTool’s object identifier, and
the variable
oTool will contain the iTool’s object reference.
Note that the iTool for which you want to retrieve the object reference must be the
currently-active tool. You can ensure that an iTool is the currently-active tool in the
following ways:
An iTool that has just been created is the currently-active tool.
Select the iTool manually, using the mouse.
Use the IDENTIFIER keyword when creating the iTool to retrieve its object
identifier. Then use the ITCURRENT procedure to make the iTool active.
IPLOT,
data
, IDENTIFIER=idTool
...
other IDL commands
...
ITCURRENT, idTool