The ITGETCURRENT function is used to get the identifier of the current tool in the IDL Intelligent Tools system.
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.
Result = ITGETCURRENT()
Returns the identifier of the current tool in the iTool system. If no tool exists, an empty string ('') is returned.
None.
None.
The following example line of code creates a plot tool:
IPLOT, SIN(FINDGEN(361)*!DTOR), COLOR = [0, 0, 255], THICK = 2
The resulting plot tool contains a blue sine function, with a line thickness of 2. To overplot a cosine function on this display, the following lines of code are used:
idSin = ITGETCURRENT() IPLOT, COS(FINDGEN(361)*!DTOR), COLOR = [0, 255, 0], THICK = 2, $ OVERPLOT = idSin
However, it is not necessary to use itGetCurrent to retrieve the current tool for overplotting. The following method is also possible because the creation of a new tool causes it to be set as current in the system. In this scenario, the commands to generate the same display are:
IPLOT, SIN(FINDGEN(361)*!DTOR), COLOR = [0, 0, 255], THICK = 2 IPLOT, COS(FINDGEN(361)*!DTOR), COLOR = [0, 255, 0], THICK = 2, $ /OVERPLOT
Introduced: 6.0