Coyote Graphics Routines

Date: Fri Mar 27 12:14:20 2015

single page | use frames     summary     class     fields     routine details     file attributes

.\

cgpickfile.pro


top cgPickfile

Utility

result = cgPickfile( [DATADIR=string] [, /DEMO] [, /JPEG] [, /HDF] [, /LAST_FILE] [, /LIDAR] [, /NCDF] [, /PNG] [, /TIFF] [, TITLE=string], WRITE=WRITE [, _REF_EXTRA=_REF_EXTRA])

This is a utility program for selecting data files. It is a wrapper for DIALOG_PICKFILE, with the additional functionality of being able to "remember" the name and directory of the last file selected by the program. It basically allows you to start the next file selection from the location of the previous file selection.

Return value

The fully-qualified name of the selected file or a null string if the CANCEL button was selected.

Keywords

DATADIR in optional type=string

Set this keyword to the name of the data directory. If not set, the program assumes the data directory is rooted in the directory that holds this program file, or the directory directly above it. If it can't find a "data" directory in either of these two locations, the current directory is used as the "data" directory. The data directory is ONLY used if there is no "current" last directory. In other words, it is only used if cgPickfile has not been called in the current IDL session.

DEMO in optional type=boolean default=0

If set, starts in the !DIR/examples/data directory.

JPEG in optional type=boolean default=0

If set, starts in the "jpeg" directory. It assumes the jpeg directory is rooted in the "data" directory.

HDF in optional type=boolean default=0

If set, starts in the "hdf" directory. It assumes the hdf directory is rooted in the "data" directory.

LAST_FILE in optional type=boolean default=0

If set, the name of the last file opened is placed in the filename widget.

LIDAR in optional type=boolean default=0

If set, starts in the "lidar" directory. It assumes the lidar directory is rooted in the "data" directory.

NCDF in optional type=boolean default=0

If set, starts in the "ncdf" directory. It assumes the ncdf directory is rooted in the "data" directory.

PNG in optional type=boolean default=0

If set, starts in the "png" directory. It assumes the png directory is rooted in the "data" directory.

TIFF in optional type=boolean default=0

If set, starts in the "tiff" directory. It assumes the tiff directory is rooted in the "data" directory.

TITLE in optional type=string default=Please Select a File

The title for the selection dialog window. If the Write keyword is set, the default title becomes "Please Select a File for Writing". write: in, optional, type=boolean, default=0 Set this keyword to change the default title to "Please Select a File for Writing".

WRITE
_REF_EXTRA in optional

Accepts any input keywords to DIALOG_PICKFILE (e.g., FILTER).

Author information

Author:

FANNING SOFTWARE CONSULTING:

David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com

Copyright:

Copyright (c) 2011-2014, Fanning Software Consulting, Inc.

History:

Change History:

Adapted from FSC_PICKFILE to be a Coyote Graphics routine by David W. Fanning, 4 Aug 2011. Added keywords TITLE and WRITE to work around a bug in Dialog_Pickfile that clips the input filenames. 25 Feb 2012. DWF. Swithched from ProgramRootDir to cgSourceDir. 27 Jan 2014. DWF.

File attributes

Modification date: Fri Mar 27 11:07:35 2015
Lines: 231
Docformat: rst rst