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

Home » Public Forums » archive » Re: Detecting IDLDE or runtime
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: Detecting IDLDE or runtime [message #24344] Tue, 27 March 2001 03:24
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Oliver Smith wrote:
>
> Hi,
>
> The short question:
> Is there a way to detect if an IDL program is running in the development
> environment, or as a run-time .sav file?

Use lmgr(/runtime)

The online help says:

The LMGR function tests whether a particular licensing mode is in
effect. The function returns True (1) if the mode specified is in
effect, or False (0) otherwise. Different licensing modes are specified
by keyword; see the "Keywords" section below for a description of each
licensing mode.
The LMGR function can also force IDL into time demo mode or report the
LMHostid number for the machine in use.
For more information on IDL's licensing methods, consult the IDL License
Management Guide, which is included in Adobe Acrobat Portable Document
Format on your IDL CD-ROM.

regards
Reimar

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
=============================================
a IDL library at ForschungsZentrum J�lich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
Re: Detecting IDLDE or runtime [message #24345 is a reply to message #24344] Tue, 27 March 2001 03:16 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Oliver Smith wrote:
>
> Hi,
>
> The short question:
> Is there a way to detect if an IDL program is running in the development
> environment, or as a run-time .sav file?
>
> The !version system variable shows no differenece between IDLDE and runtime.
>
> The reason:
> I've written a fairly extensive project in IDL that will shortly be shipped
> to colleagues. I'd like them to have the option of using the runtime
> version saved as, 'CUSTARD.sav'. My program has the ability to detect user
> written plugins named 'plugin*.pro' located in an appropriate directory. The
> program searches for these files, then compiles and runs one using
> CALL_PROCEDURE.
>
> All works fine if the project is built and run in the IDL development
> environment, however, if the runtime version is used then, not surprisingly,
> CALL_PROCEDURE doesn't work (unless the particular plugin was included in
> the project at build time). I don't have a problem with this functionality
> of IDL, and I have a work around that includes a list of available plugins
> included in the save file at build time. The problem is detecting whether
> the software should look at this list, or search for additional plugins and
> try to use call_procedure.
>
> Cheers,
>
> Oliver

No idea about this, sorry. But couldn't you do something like this:

plugins = findfile(repository+'*.pro')
IF plugins NE '' THEN BEGIN
FOR i=0,N_Elements(plugins)-1 DO BEGIN
resolve_routine, plugins[i] ;; may need to determine if it is
a pro or function
print, 'Compiled routine '+plugins[i]
ENDFOR
ENDIF

Don't forget to install a CATCH error handler, though!

Cheers,
Martin

--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Detecting IDLDE or runtime
Next Topic: Kodak Forms Global Imaging Business

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

Current Time: Fri Oct 10 07:02:17 PDT 2025

Total time taken to generate the page: 0.15897 seconds