Re: IDLRT error - attempt to call undefined procedure [message #92305 is a reply to message #92304] |
Fri, 13 November 2015 11:46   |
Jonas Ardo
Messages: 12 Registered: April 2014
|
Junior Member |
|
|
On 13/11/2015 19:58, David Fanning wrote:
> Jonas Ardo writes:
>
>> I have a *.PRO (LOGGERNET2WEB.PRO) producing a set of plots and it
> works OK when I run it manually.
>> I like to call it from a *.bat file to be automatically executed without starting IDL (i.e. using IDLRT).
>>
>> Using:
>> IDL>.COMPILE LOGGERNET2WEB
>> IDL>RESOLVE_ALL
>> IDL>save, /routines, filename = 'LOGGERNET2WEB.sav'
>> IDL>restore, 'LOGGERNET2WEB.sav'
>> IDL>LOGGERNET2WEB
>>
>> works fine.
>>
>>
>> But when using IDLRT (after closing IDL):
>> "C:\Program Files\Exelis\IDL85\bin\bin.x86\idlrt.exe" loggernet2web.sav
>>
>> I get errors such as
>> "CGWINDOW--> Attempt to call undefined procedure: 'CGMDWINDOW_DEFINE'"
>> "CGWINDOW does not exists ...."
>> etc
>>
>> IDLRT works fine with minor code such as plot etc (not using cg* commands)
>>
>> I am using IDL8.5 on Windows 8.
>> Any suggestions?
>
> The problem is, RESOLVE_ALL doesn't really resolve, well, *all* of the
> routines. In particular, it doesn't resolve object definitions:
>
> http://www.idlcoyote.com/ographics_tips/rt_objects.html
>
> You can use the CLASS keyword to RESOLVE_ALL to identify those few
> Coyote Library objects you are going to need in your program.
>
> IDL> RESOLVE_ALL, CLASS='CGCMDWINDOW'
>
> There may be a few more. Any routine in the library with an
> "__define.pro" in its name is a candidate.
>
> http://idlcoyote.com/idldoc/cg/index.html
>
> Cheers,
>
> David
>
Thanks, now, running with idlrt, it only needed:
.reset
.COMPILE loggernet2web
RESOLVE_ALL, CLASS='CGCMDWINDOW'
.Compile cgcmdwindow__define.pro
.Compile cggraphicskeywords__define.pro
.Compile idl_object__define.pro
.Compile linkedlist__define.pro
.Compile cgps_setup__define.pro
.Compile fsc_psconfig__define.pro
save, /routines, filename = 'LOGGERNET2WEB.sav'
Is there any option like
.Compile *__define.pro
cheers
/Jonas
|
|
|