comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: test for ENVI running in IDL code
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: test for ENVI running in IDL code [message #41851] Tue, 07 December 2004 05:45
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
enod writes:

> There may be a little trouble. What will happen if only IDL is running?
> The function envi_real_main_base() will not be available.

Well, I think that is pretty much the *point* of Peter's
little piece of code. :-)

Cheers,

David

P.S. Tip to Peter: It doesn't pay to be subtle when posting
to public forums. Better to just spell it out, even if the
code looks clunky. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: test for ENVI running in IDL code [message #41853 is a reply to message #41851] Tue, 07 December 2004 05:05 Go to previous message
timothy.williams is currently offline  timothy.williams
Messages: 20
Registered: October 2001
Junior Member
enod wrote:
> There may be a little trouble. What will happen if only IDL is
running?
> The function envi_real_main_base() will not be available. To check if
> one function is loaded, you can issue a HELP command:
>
> help,name='envi_open_file',/routines,output=output
>
> Search the *output* variable for "envi_open_file" function and then
you
> can figure out if ENVI is running.
>
> Tian.
>
> P.S. It seems that envi_real_main_base is not listed in ENVI help
> document, so the check of it could result in failure.

Exactly my point. I like the idea of using HELP. I'll give it a try.
Thanks.
Re: test for ENVI running in IDL code [message #41854 is a reply to message #41853] Tue, 07 December 2004 05:03 Go to previous message
timothy.williams is currently offline  timothy.williams
Messages: 20
Registered: October 2001
Junior Member
enod wrote:
> There may be a little trouble. What will happen if only IDL is
running?
> The function envi_real_main_base() will not be available. To check if
> one function is loaded, you can issue a HELP command:
>
> help,name='envi_open_file',/routines,output=output
>
> Search the *output* variable for "envi_open_file" function and then
you
> can figure out if ENVI is running.
>
> Tian.
>
> P.S. It seems that envi_real_main_base is not listed in ENVI help
> document, so the check of it could result in failure.

Exactly my point. I like the idea of using HELP. I'll give it a try.
Thanks.
Re: test for ENVI running in IDL code [message #41855 is a reply to message #41854] Tue, 07 December 2004 05:04 Go to previous message
timothy.williams is currently offline  timothy.williams
Messages: 20
Registered: October 2001
Junior Member
enod wrote:
> There may be a little trouble. What will happen if only IDL is
running?
> The function envi_real_main_base() will not be available. To check if
> one function is loaded, you can issue a HELP command:
>
> help,name='envi_open_file',/routines,output=output
>
> Search the *output* variable for "envi_open_file" function and then
you
> can figure out if ENVI is running.
>
> Tian.
>
> P.S. It seems that envi_real_main_base is not listed in ENVI help
> document, so the check of it could result in failure.

Exactly my point. I like the idea of using HELP. I'll give it a try.
Thanks.
Re: test for ENVI running in IDL code [message #41859 is a reply to message #41854] Mon, 06 December 2004 22:52 Go to previous message
enod is currently offline  enod
Messages: 41
Registered: November 2004
Member
There may be a little trouble. What will happen if only IDL is running?
The function envi_real_main_base() will not be available. To check if
one function is loaded, you can issue a HELP command:

help,name='envi_open_file',/routines,output=output

Search the *output* variable for "envi_open_file" function and then you
can figure out if ENVI is running.

Tian.

P.S. It seems that envi_real_main_base is not listed in ENVI help
document, so the check of it could result in failure.
Re: test for ENVI running in IDL code [message #41869 is a reply to message #41859] Mon, 06 December 2004 15:18 Go to previous message
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
timothy.williams@nvl.army.mil wrote:
> Is there a way to check to see if ENVI is already running from IDL?
> I'm writing an application that uses ENVI (6.1) and I want to be sure
> that envi is running before I start calling ENVI_* routines.
>
> Thanks.

Hi Timothy,

There's probably a better way and the following function is a bit brutal,
but it works:

forward_function envi_real_main_base
function enviloaded, nothing
catch, e
if keyword_set(e) then return, 0
return, widget_info( envi_real_main_base(), /valid )
end


Cheers
Peter Mason.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: BGR color instead of RGB
Next Topic: Re: BGR color instead of RGB

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:28:12 PDT 2025

Total time taken to generate the page: 0.03167 seconds