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

Home » Public Forums » archive » Re: cgwindow and output file name
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: cgwindow and output file name [message #80773 is a reply to message #80771] Wed, 11 July 2012 06:43 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mats Löfdahl writes:

> When you use the "Save Window As" functionality in a
> cgwindow, the default file name is cgwindow.EXT in
> the current directory, where EXT depends on the format you want.
>
> If you want another file name you can seklect an
> existing file name or type in a new name in the popup
> dialogue. This becomes a bit tedious (and error prone)
> if you have to do it a lot. I've been looking for a
> way to specify the file name when creating the window >
> but I can't find anything.
>
> Is there a way to do it?

There are not too many things you can do when
you are working with an interactive program. I
could, of course, give you a place to write the
filename you want, but that is nearly as tedious
as, well, writing it the way you are doing it now. :-)

Still, you do have this control already, because
it is possible to ask cgWindow to output the
contents of the window independently of the window. And,
of course, you can specify the name of the output
file when you do so:

cgControl, OUTPUT='whateveryoulike.png'

I do store the name of the *last* file you interacted with
with cgPickfile (presumably, in this case, the last file
you wrote if you are only working with one window at a time)
and I could retrieve the basename of that file and use it.
There will be errors from time to time if you are using
cgPickfile for other things.

I could also (but this is a LOT more work and I have
a full-time job now) allow you to suggest a name for
the output file and use that. That may, in time, become
just as tedious as the current solution, and it is
certain to complicate the code a great deal. It doesn't
immediately jump out at me as the "right thing to do".

In this case, I don't see a clear way forward. I wonder
if anyone else has a good idea?

Cheers,

David







--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: density color schemes in IDL8 scatterplots
Next Topic: Re: include COI on wavelet plots using toolkit

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

Current Time: Fri Oct 10 07:52:48 PDT 2025

Total time taken to generate the page: 1.11818 seconds