Previous IDL Reference Guide: Procedures and Functions Next

ITCURRENT

Syntax | Arguments | Keywords | Example | Version History

The ITCURRENT procedure is used to set the current tool in the IDL Intelligent Tools system. This routine is used with the identifier of the tool to make it current in the system. If the identifier is valid, the specified tool becomes current.

When a tool is set as current, the visible display or the focus state of the tool does not change. Only the internal setting of the current tool changes.

Besides using this procedure to set the current tool, a tool is made current when it is created or when it is placed in focus in the current windowing system.

This routine is written in the IDL language. Its source code can be found in the file itcurrent.pro in the lib/itools subdirectory of the IDL distribution.

Syntax

ITCURRENT, iToolID

Arguments

iToolID

The identifier of the existing iTool to be set as current.

Keywords

None.

Example

Enter the following at the IDL Command Line:

IPLOT, IDENTIFIER = PlotID1  
current1 = ITGETCURRENT()  
PRINT, 'The current tool is ', current1  

An iPlot tool is created, and the newly created iPlot tool becomes the current tool. Output similar to the following appears in the IDL Output Log:

The current tool is /TOOLS/IPLOT_8  

Enter the following at the IDL Command Line:

IPLOT, IDENTIFIER = PlotID2  
current2 = ITGETCURRENT()  
PRINT, 'The current tool is ', current2  

A second iPlot tool is created, and this newly created iPlot tool becomes the current tool. Output similar to the following appears in the IDL Output Log:

The current tool is /TOOLS/IPLOT_9  

Enter the following at the IDL Command Line:

ISURFACE, IDENTIFIER = SurfaceID1  
current3 = ITGETCURRENT()  
PRINT, 'The current tool is ', current3  

An iSurface tool is created, and the newly created iSurface tool becomes the current tool. Output similar to the following appears in the IDL Output Log:

The current tool is /TOOLS/ISURFACE_5  

Enter the following at the IDL Command Line:

ITCURRENT, PlotID1  
current = ITGETCURRENT()  
PRINT, 'The current tool is ', current  
END  

The iPlot tool created at the beginning of the example (PlotID1) becomes the current tool. Output similar to the following appears in the IDL Output Log:

The current tool is /TOOLS/IPLOT_8  

Note that the system ID of the current tool (IPLOT_8) is the same as that of the current tool at the beginning of the exercise.

Version History

6.0
Introduced

See Also

ITDELETE, ITGETCURRENT, ITRESET

  IDL Online Help (March 06, 2007)