Re: Problem with compiling ENVI-BATCH routine [message #51176] |
Wed, 08 November 2006 07:10 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Josip Krizan writes:
> I thought so, but why then I can access ENVI_OPEN_FILE, ENVI_DOIT, .... and
> others?
I'm not sure I understand this question. You can access
them because after you restore the save files, these routines
exist in your IDL session as if you had compiled them.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Problem with compiling ENVI-BATCH routine [message #51179 is a reply to message #51176] |
Wed, 08 November 2006 06:50  |
Josip Krizan
Messages: 5 Registered: November 2006
|
Junior Member |
|
|
On Wed, 8 Nov 2006 07:04:50 -0700, David Fanning wrote:
> Josip Krizan writes:
>
>> I have write some procedure :
>>
>> PRO, Something
>>
>> compile_opt IDL2
>> envi, /restore_base_save_files
>> envi_batch_init, log_file='batch_log.txt'
>>
>> ;open some file
>> ENVI_OPEN_FILE, inImage, R_FID=fidImg
>> ....
>> envi_batch_exit
>> END
>>
>> Compiling of this procedure throws syntax error on all lines with
>> ENVI_GETMAP_INFO and ENVI_GET_DATA.
>> Solution is to run command: 'envi, /restore_base_save_files' first, and
>> then compiling is done without errors.
>>
>> Does anybody has any idea about this?
>
> You do not have ENVI source files, so no files that can
> be "compiled". ENVI is distributed as IDL "save" files.
> In other words, the ENVI routines are distributed as
> already-compiled routines. But to access them, you have
> to bring them into the IDL "procedure space". You do this
> by "restoring" the IDL save files. This is the purpose
> of the 'envi, /restore_base_save_files' command.
>
> Cheers,
>
> David
I thought so, but why then I can access ENVI_OPEN_FILE, ENVI_DOIT, .... and
others?
|
|
|
Re: Problem with compiling ENVI-BATCH routine [message #51186 is a reply to message #51179] |
Wed, 08 November 2006 06:04  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Josip Krizan writes:
> I have write some procedure :
>
> PRO, Something
>
> compile_opt IDL2
> envi, /restore_base_save_files
> envi_batch_init, log_file='batch_log.txt'
>
> ;open some file
> ENVI_OPEN_FILE, inImage, R_FID=fidImg
> ....
> envi_batch_exit
> END
>
> Compiling of this procedure throws syntax error on all lines with
> ENVI_GETMAP_INFO and ENVI_GET_DATA.
> Solution is to run command: 'envi, /restore_base_save_files' first, and
> then compiling is done without errors.
>
> Does anybody has any idea about this?
You do not have ENVI source files, so no files that can
be "compiled". ENVI is distributed as IDL "save" files.
In other words, the ENVI routines are distributed as
already-compiled routines. But to access them, you have
to bring them into the IDL "procedure space". You do this
by "restoring" the IDL save files. This is the purpose
of the 'envi, /restore_base_save_files' command.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|