This method allows the removal of an IDLParameter class after ENVITask creation.


You can remove a parameter from an ENVITask if you want to prevent it from being passed into the underlying procedure. For example, to force the user to specify the INPUT_NBINS parameter instead of INPUT_BINSIZE on the RasterHistogram task:

; Start the application
e = ENVI()
; load the task
task = ENVITask('RasterHistogram')
; remove the parameter
task.RemoveParameter, 'INPUT_BINSIZE'


ENVITask.RemoveParameter, ParameterName [, ALL=all] [, ERROR=variable]



Specify a string matching the NAME property of the IDLParameter to remove from this task. An array of names can be used to remove multiple parameters at once.



Set this keyword to remove all IDLParameters from the task, instead of only the parameter matching the ParameterName argument.


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.

API Version


Version History

ENVI 5.3 SP 2


ENVI 5.4. 1

Uses the appropriate IDLParameter class instead of ENVITaskParameter (which has been deprecated)