7576 Rate this article:
No rating

Where am I?

Mark Bowersox
Well, more accurately, "where on the filesystem is the source for the currently scoped routine?", but that's not a catchy title. In IDL 8.2.2, the ROUTINE_FILEPATH function was modified to return this information when called without any parameters. Here's a simple program demonstrating this behavior:
pro routine_filepath_no_params
   compile_opt idl2

   print, 'I''m called from a program in the file: ' + routine_filepath()
end
When I run this program, I get:
IDL> routine_filepath_no_params
I'm called from a program in the file: /home/mpiper/VIS/IDL/8/22/demos/src/routine_filepath_no_params.pro
Jim Pendleton, for example, has found this helpful in determining whether a program is being run from a SAVE file or a PRO file. I've used it to save a visualization to a PNG file with the same base name as the PRO file in which it's generated. (This is, I think, my last 8.2.2 post before 8.2.3 comes out next week!)
MOST RECENT

A Technical Dive into Creating Accurate Digital Terrain Models

6/27/2018

Live Webinar | July 25 Creating accurate digital terrain models (DTMs) is essential for modeling areas of... more »

The Science, and Art, of Hyperspectral Image Analysis

6/7/2018

Harris Geospatial Solutions – June 7, 2018 Automation is being touted as the wave of the future for... more »

SIGN UP & STAY INFORMED

Sign up to receive the latest news, events, technologies and special offers.

SIGN ME UP