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

Home » Public Forums » archive » Re: Including ASCII file in .sav ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Including ASCII file in .sav ? [message #59122] Wed, 12 March 2008 07:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wtt writes:

> I have a text file that I would like to have displayed when the user
> selects a certain menu item. Is there something special that I need to
> do in order to reference this text file? It is included in the
> project. I looked at the OPENR description, and it seems to want to
> open files from the filesystem.

Typically, you include the text file with the save file
in the distribution of the software, then refer to it by
relating it to the location of the save file. PROGRAMROOTDIR
is useful for this purpose:

http://www.dfanning.com/programs/programrootdir.pro

In other words, suppose your save file is stored in
a directory named "coyote", and the data files are
stored in a sub-directory of coyote, named "data".
Then, the program would refer to the "data" directory
like this:

file = Filepath(Root_Dir=ProgramRootDir(), Subdir='data', $
'mydatafile.txt')

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Including ASCII file in .sav ?
Next Topic: Re: How to plot the magnetic field vector along the trajectory

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

Current Time: Sat Oct 11 09:38:42 PDT 2025

Total time taken to generate the page: 0.24326 seconds