The AddExtension method allows a Toolbox extension to rename the entry in the extensions folder, and optionally to place the Toolbox entry inside a user-defined folder structure.

To have the Toolbox display the renamed entry in the current session, issue the .RESET_SESSION command after calling the AddExtension method. The following locations are searched for extensions:

  • Install_Dir/ENVILiDARxx/extensions

  • user_home/.idl/ENVILiDAR/extensionsx_x

  • The directory set by the environment variable ENVILIDAR_EXTENSIONS

Note: The AddExtension method should not be used during Application Control (interactive use) or inside batch programs. This method should only be included in an EXTENSIONS_INIT routine.

This method has been deprecated. Use ENVI::AddExtension instead.

Example


See Write and Deploy Toolbox Extensions for a template and details about creating your own extension.

Syntax


E3De.AddExtension, Name, Routine [, ERROR=variable] [, PATH=string] [, UVALUE=string]

Arguments


Name

A scalar string denoting the name that will appear in the Toolbox.

Routine

A scalar string denoting the IDL procedure that will be run when the Toolbox item is double-clicked.

Keywords


ERROR

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See Manage Errors for more information on error handling in ENVI programming.

PATH

A scalar string denoting the tree structure, under the \extensions folder, in which the Toolbox item will appear. If PATH is not specified, the item is added directly to the end of the Extensions folder. Multiple subfolders may be specified by adding the '/' character between folder names (for example, "My Routines/Statistics"). If a folder does not currently exist, it will be created.

UVALUE

Set this keyword to a value containing information you want to maintain about the new Toolbox item. This value can be retrieved from the event widget ID in the new Toolbox item's event handling procedure.

Version History


3.2

Introduced

ENVI 5.3 Obsolete

See Also


E3De, Write and Deploy Toolbox Extensions