Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: Including A...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 5530 of 6454
Post > Topic >>

Re: Including ASCII file in .sav ?

by David Fanning <news@[EMAIL PROTECTED] > Mar 12, 2008 at 08:03 AM

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/
Se****e ma de ni thui. ("Perhaps thou speakest truth.")
 




 4 Posts in Topic:
Including ASCII file in .sav ?
wtt <wtriplett@[EMAIL   2008-03-12 06:54:45 
Re: Including ASCII file in .sav ?
Vince Hradil <hradilv@  2008-03-12 07:00:42 
Re: Including ASCII file in .sav ?
David Fanning <news@[E  2008-03-12 08:03:27 
Re: Including ASCII file in .sav ?
David Fanning <news@[E  2008-03-12 08:03:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 14:07:16 CST 2008.