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

Home » Public Forums » archive » Re: Filename variable from device?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Filename variable from device? [message #64471] Mon, 05 January 2009 09:38 Go to next message
Vince Hradil is currently offline  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 Go to previous message
David Fanning is currently offline  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 Go to previous message
dr.paul.woods is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Image Map Overlays and Grids, Oh My!
Next Topic: Random number generators in IDL

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

Current Time: Fri Oct 10 03:41:56 PDT 2025

Total time taken to generate the page: 0.95955 seconds