Re: Filename variable from device? [message #64471] |
Mon, 05 January 2009 09:38  |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Jan 5, 10:45 am, dr.paul.wo...@gmail.com wrote:
> In IDL, I wondered if it was possible to store the output filename
> used in the DEVICE command as a variable, so that you can print it,
> etc.? e.g.:
>
> if keyword_set(ps) then begin
> displaycolors=!D.N_colors
> set_plot,'ps'
> device,filename='output.ps',/color,/cmyk,bits_per_pixel=8
> print,"Output written to ",filename
> endif
Sure:
psfile = 'output.ps'
device,filename=psfile,/color,/cmyk,bits_per_pixel=8
print, "Output written to ", psfile
Or is this not what you mean?
|
|
|
Re: Filename variable from device? [message #64569 is a reply to message #64471] |
Mon, 05 January 2009 10:23  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Vince Hradil writes:
> psfile =3D 'output.ps'
> device,filename=3Dpsfile,/color,/cmyk,bits_per_pixel=3D8
> print, "Output written to ", psfile
>
> Or is this not what you mean?
Whew! I was still looking for a way to be diplomatic. Thanks
for finding it. :-)
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Filename variable from device? [message #64570 is a reply to message #64471] |
Mon, 05 January 2009 09:41  |
dr.paul.woods
Messages: 2 Registered: January 2009
|
Junior Member |
|
|
On Jan 5, 5:38 pm, Vince Hradil <vincehra...@gmail.com> wrote:
> On Jan 5, 10:45 am, dr.paul.wo...@gmail.com wrote:
>
>> In IDL, I wondered if it was possible to store the output filename
>> used in the DEVICE command as a variable, so that you can print it,
>> etc.? e.g.:
>
>> if keyword_set(ps) then begin
>> displaycolors=!D.N_colors
>> set_plot,'ps'
>> device,filename='output.ps',/color,/cmyk,bits_per_pixel=8
>> print,"Output written to ",filename
>> endif
>
> Sure:
>
> psfile = 'output.ps'
> device,filename=psfile,/color,/cmyk,bits_per_pixel=8
> print, "Output written to ", psfile
>
> Or is this not what you mean?
Aha, yes, that is what I mean. Just being very slow-minded, it seems.
It is Monday...
Thank you, Vince.
|
|
|