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 IGETCURRENT function to retrieve the object reference to the currently-active iTool:

idTool = IGETCURRENT(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: