Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  ENVI API  >  Obsolete  >  ENVI_BATCH_INIT

ENVI_BATCH_INIT

ENVI_BATCH_INIT

This routine has been replaced with the ENVI function. To run ENVI in batch mode without user interaction, use the following code:

e = ENVI(/HEADLESS)

which replaces the following code:

ENVI, /RESTORE_BASE_SAVE_FILES
ENVI_BATCH_INIT, /NO_STATUS_WINDOW

See Manage Errors for details on redirecting application messages to a log file, instead of using the following code:

ENVI_BATCH_INIT, LOG_FILE=string

Use this procedure to initialize ENVI Classic in the non-menu batch mode.

Do not attempt to initialize ENVI Classic in batch mode from an IDL session that is currently running an interactive ENVI Classic session. Instead, start a new IDL session to initialize ENVI Classic in batch mode.

Syntax


ENVI_BATCH_INIT [, BATCH_LUN=variable] [, LOG_FILE=string] [, /NO_STATUS_WINDOW]

Keywords


BATCH_LUN (optional)

Use this keyword to specify a named variable that contains the logical unit number (LUN) of a batch log file. This keyword passes the LUN of an opened batch log file to ENVI_BATCH_INIT so that ENVI will continue writing to it.

The following example code retrieves a LUN from an input file and passes it to ENVI_BATCH_INIT. When the routine returns, the value of the LUN has not been modified.

logfile = 'C:\temp\log.txt'
OPENW, LUN, logfile, /APPEND, /GET_LUN
PRINT, 'LUN on input is ' + STRTRIM(LUN, 2)
PRINTF, LUN, 'Processing started at ' + systime()
ENVI_BATCH_INIT, BATCH_LUN=LUN
PRINT, 'LUN on output is ' + STRTRIM(LUN, 2)
;
; Process data
;
PRINTF, LUN, 'Processing ended at ' + SYSTIME()
FREE_LUN, LUN
ENVI_BATCH_EXIT, /NO_CONFIRM

If you pass an existing LUN to BATCH_LUN as in this example, then you must explicitly close or free the LUN when ENVI exits.

LOG_FILE (optional)

Use this keyword to specify a batch log file. Any errors or warnings that would normally appear on the screen during an interactive ENVI Classic session will be written to the log file. It is important to check your log file after your processing is complete, to make sure no errors have occurred. LOG_FILE is a string variable specifying the filename and path of the batch log file.

NO_STATUS_WINDOW (optional)

Set this keyword to prevent the ENVI Classic processing status window from displaying. Additional control of the status window can be achieved using ENVI_BATCH_STATUS_WINDOW.



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us