The PreExecute method is called first when ENVITask::Execute runs. It performs the following actions:

  • Resets all output parameters to !NULL.
  • Updates input parameter values from keywords set on ENVITask::Execute.
  • Generates temporary files and folders for input ENVIURI and ENVIVirtualizableURI parameters, if not set by the end user.
  • Verifies that input URI parameters that generate output have write permissions and do not already exist.
  • Validates that all required input parameters are set.


In most cases, the PreExecute method is called by ENVITask::Execute. The only time it should be called explicitly is when a base class other than ENVITaskFromProcedure overrides ENVITask::Execute. When called explicitly, the syntax is as follows:

Obj -> [ENVITaskFromProcedure::]PreExecute, _REF_EXTRA=refExtra

Routine Signature

To overload an object class in order to add more functionality to PreExecute, implement a method with the following signature:

PRO class::PreExecute, _REF_EXTRA=refExtra

Version History

ENVI 5.2. 1


API Version


See Also

ENVITask, ENVITaskFromProcedure, Custom Tasks