Groups | Search | Server Info | Login | Register


Groups > comp.lang.idl > #127

Re: IDL not recognizing procedure in expanded path

Newsgroups comp.lang.idl
Date 2017-10-25 07:12 -0700
References <621b4dd3-e5ac-4ef8-807d-26ea2dbd5c10@googlegroups.com>
Message-ID <c3dc2242-c346-459f-9b30-474d1d4f00d2@googlegroups.com> (permalink)
Subject Re: IDL not recognizing procedure in expanded path
From benjamin.castellani@gmail.com

Show all headers | View raw


On Friday, October 20, 2017 at 11:46:25 AM UTC-6, nelson....@gmail.com wrote:
> Hello,
> 
> I have a problem on my hands I haven't been able to find a solution for. Here are the basics:
> 
> I'm creating a centralized library for my research group of IDL procedures and routines that we can call to avoid re-inventing the wheel and not have to include the @procedure_path statements at the beginning of out programs. 
> 
> I was able to get IDL to recognize the path to all of the routines in the centralized library by following David Fanning's page (http://www.idlcoyote.com/code_tips/installcoyote.php). When I use IDL's PrintPath function, it returns the correct path to the directory:
> 
> IDL> PrintPath
> ...
> /cloud/code_ro/lib/idl/io_lib/gps_io
> ...
> 
> The full file path is then: /cloud/code_ro/lib/idl/io_lib/gps_io/get_ncdf_atmPrf_ucar_cosmic2013.pro
> 
> IDL> 
> 
> I have a program I wrote just to test why these particular routines won't automatically compile and run inside the main program as well by giving it a file path and then calling the routine, which amounts to:
> 
> file_name = foo (this is super long with the whole path)
> get_ncdf_atmPrf_ucar_cosmic2013, foo, ...
> END
> 
> The result I get when I run this is: 
> 
> IDL> .run test.pro
> % Compiled module: $MAIN$.
> % Attempt to call undefined procedure: 'GET_NCDF_ATMPRF_UCAR_COSMIC2013'.
> % Execution halted at: $MAIN$              4 /home/knelson12/test.pro
> IDL> 
> 
> However, I can run the following, and it recognizes the routine just fine:
> 
> IDL> .compile get_ncdf_atmPrf_ucar_cosmic2013
> % Compiled module: GET_NCDF_ATMPRF_UCAR_COSMIC2013.
> IDL> 
> 
> Does anyone have any thoughts on this? Thank you in advance.
> 
> - Kevin

Hi Kevin,

First, the PrintPath.pro procedure is not a first-party program that comes with IDL, so I can't comment on that. 

The error you are getting still suggests the path is not being recognized. Try using "!PATH" at the IDL command line or console. Does this show the directory containing GET_NCDF_ATMPRF_UCAR_COSMIC2013.pro ? 

This is the correct way to modify IDL Paths: 
!PATH = EXPAND_PATH('<IDL_DEFAULT>:+/home/joeuser/myidllib')

NOTE: Use the "+" sign to include all subdirectories.

Here is more information: http://www.harrisgeospatial.com/Support/SelfHelpTools/HelpArticles/HelpArticles-Detail/TabId/2718/ArtMID/10220/ArticleID/16156/Quick-tips-for-customizing-your-IDL-program-search-path.aspx

Hope this helps. 

Ben C
IDL Team 
Harris Geospatial Solutions
Boulder, Colorado

Back to comp.lang.idl | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

IDL not recognizing procedure in expanded path nelson.kevin09@gmail.com - 2017-10-20 10:46 -0700
  Re: IDL not recognizing procedure in expanded path benjamin.castellani@gmail.com - 2017-10-25 07:12 -0700
    Re: IDL not recognizing procedure in expanded path nelson.kevin09@gmail.com - 2017-10-31 10:28 -0700
      Re: IDL not recognizing procedure in expanded path nelson.kevin09@gmail.com - 2017-10-31 11:23 -0700

csiph-web