how to get filename of current PS output [message #7212] |
Fri, 18 October 1996 00:00  |
f055
Messages: 29 Registered: April 1995
|
Junior Member |
|
|
Is there any way in which a program can find out the filename of the
currently open postscript file. I know you can do help,/device to
display it on the screen, but I'm not sure how to put the filename into
a variable.
Cheers,
Tim
......................... Dr Tim Osborn . t.osborn@uea.ac.uk
.... ___/.. __ /.. /.. /. Senior Research Associate . phone:01603 592089
... /..... /. /.. /.. /.. Climatic Research Unit . fax: 01603 507784
.. /..... __/.. /.. /... School of Environmental Sciences.
. /..... /\ ... /.. /.... University of East Anglia .
____/.._/..\_..____/..... Norwich NR4 7TJ .
......................... UK .
|
|
|
Re: how to get filename of current PS output [message #7280 is a reply to message #7212] |
Thu, 24 October 1996 00:00  |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
On 18 Oct 1996, T.Osborn wrote:
> Is there any way in which a program can find out the filename of the
> currently open postscript file. I know you can do help,/device to
> display it on the screen, but I'm not sure how to put the filename into
> a variable.
The default filename is "idl.ps". If you set your own filename with the
DEVICE,FILENAME=... command (after doing SET_PLOT,'PS'), then the easiest
way to know the filename is to keep track of the one you used!
If you simply have to do it automatically, then do:
J=FSTAT(!D.UNIT) &FNAME=J.NAME
(This will only work if something has already been written out to the file.)
I imagine that you might be wanting to do this to find out the directory
in which the file has been created. I think the only way to do this is
to include a full path spec in DEVICE,FILENAME=...
Peter Mason
|
|
|