The features described in this topic are obsolete
and should not be used in new IDL code.
ITGETCURRENT
Syntax | Return Value | Arguments | Keywords | Example | Version History
The ITGETCURRENT function is used to get the identifier of, and optionally and object reference to, the current tool in the IDL Intelligent Tools system.
Note
You can also retrieve the identifier of an iTool by specifying the IDENTIFIER keyword in the call to the routine that creates the tool (e.g. IPLOT or IIMAGE).
This routine is written in the IDL language. Its source code can be found in the file itgetcurrent.pro in the lib/itools subdirectory of the IDL distribution.
Syntax
Result = ITGETCURRENT( [, TOOL=variable] )
Return Value
Returns the identifier of the current tool in the iTool system. If no tool exists, an empty string ('') is returned.
Arguments
None.
Keywords
TOOL
Set this keyword to a named variable in which to return the object reference to the current tool object, or a null object if no tool exists.
Example
Suppose you have several iPlot tools running in your IDL session, and want to retrieve the iTool identifier for one of them. Select the iPlot tool using the mouse, and issue the following IDL command:
The idPlot variable would contain the iTool identifier for the selected tool.
Controlling the contents of an existing iTool from the IDL command line sometimes requires the use of the iTool's object reference rather than its identifier. For example, suppose you have created an iPlot tool using the following command:
IPLOT, SIN(FINDGEN(361) * !DTOR), COLOR=[0, 0, 255], THICK=2
To rotate the plot from the IDL command line, you could use the following statements:
idPlot = ITGETCURRENT(TOOL=oPlot)
void = oPlot->DoAction('OPERATIONS/OPERATIONS/ROTATE/ROTATERIGHT')
The process of controlling an iTool from the IDL command line is discussed in detail in Controlling iTools from the IDL Command Line (iTool Developer's Guide).
Version History