Documentation for pp_lib

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

./

pp_gettoolid.pro


Routines

top source pp_gettoolid

result = pp_gettoolid( [id], tool=tool)

Returns a valid (if any) tool ID, from the supplied (if any) id. This is useful inside routines that operate on iTools or Graphics, that have an input ID, but want to revert to the current tool if that is not provided or not valid. Also useful to retrieve a tool ID from a Graphics full identifier (as from the getfullidentifier method).

Parameters

id in optional

The ID to try to use to retrieve the actual tool ID. If the provided ID is valid, it is returned. Otherwise, if it is a Graphics full identifier (as from the getfullidentifier method), the returned ID is the corresponding tool ID. If it is not valid, the current tool ID (if any) is returned.

Keywords

tool

Returns the tool object associated with that id.

Examples

Make a couple of tools and see their IDs:

p=plot(/test,identifier=p_identifier) print,p_identifier ;/TOOLS/GRAPHIC print,p.getfullidentifier() ;/TOOLS/GRAPHIC/WINDOW/VIEW_1/VISUALIZATION LAYER/DATA SPACE/PLOT print,pp_gettoolid(p.getfullidentifier()) ;/TOOLS/GRAPHIC iplot,identifier=ip_identifier print,ip_identifier ;/TOOLS/PLOT TOOL print,pp_gettoolid() ;/TOOLS/PLOT TOOL

Author information

Author:

Paulo Penteado (pp.penteado@gmail.com), Feb/2010

Statistics

Lines:
16 lines
Cyclomatic complexity:
3
Modified cyclomatic complexity:
3

File attributes

Modification date: Wed Jun 29 22:15:28 2016
Lines: 16
Docformat: rst rst