Re: Getting filename from PS device [message #12460] |
Mon, 03 August 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Bob Reid (breid@lpl.arizona.edu) writes:
> How can I determine the filename that the PS device is using? I'd like
> to write a timestamp contining the output filename when I close the
> PS device, but for convenience, I would like the timestamp routine to be
> able to figure out the output filename without having to create a new
> variable.
If you don't know the PostScript output filename (i.e., you
didn't set it to something in your code or you don't have a
variable that contains the name), then the chances
approach about 100% that its name is "idl.ps". It will
be located in the current directory:
CD, Current=thisDirectory
Print, thisDirectory
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Getting filename from PS device [message #12468 is a reply to message #12460] |
Mon, 03 August 1998 00:00  |
Brian Jackel
Messages: 34 Registered: January 1998
|
Member |
|
|
Bob Reid wrote:
>
> Hi all.
>
> How can I determine the filename that the PS device is using?
Here's one way:
SET_PLOT,'ps'
*do some plotting here*
psfilename= (FSTAT(!d.unit)).name
Note that the !d.unit variable seems to be 0 immediately
after the set_plot, but is set to the correct value after
there's been some graphics output. Bug or feature?
Brian Jackel
University of Calgary
|
|
|