Some options when running programs

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

cap
Posts: 55
Joined: Fri Oct 17, 2008 11:47 am

Some options when running programs

Postby cap » Mon Dec 08, 2008 1:29 pm

Hello,


When running some program code, a new workfile window is created. If I make some small changes to the code, and run it again, a whole new workfile window is created. Is there anyway to make the program's output simply write over the first workfile and not make a new second one?


Also, after pressing the run button, a run dialog box always comes up (asking for verbose vs. quiet, etc). Is there a way to make this box not always come up after pressing run?



Thanks,
Calvin

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11406
Joined: Tue Sep 16, 2008 5:38 pm

Re: Some options when running programs

Postby EViews Gareth » Mon Dec 08, 2008 1:44 pm

The first part of your question is somewhat ambiguous. At first glance I thought you meant that object windows pop up (a common question we get asked is how to stop them from doing so), but it appears you're actually talking about actual workfiles getting created and shown. Well, off the top of my head the only way that a workfile can get created and shown is by you issuing a command to create a new workfile. The simple solution is to not ask EViews to create a new workfile!

If you need to create more than one workfile, then you could always close the old ones (using the close command) before creating new ones. This lets you control how many are open at once.

Of course if you're creating untitled workfiles, then you can set a global option (Options->Windows and Font Options) to only allow one untitled workfile at a time. Then whenever you create a new untitiled workfile, the old one is over-written.



Finally, if you run a program from the command line (using the run command) the run dialog will not appear.
Follow us on Twitter @IHSEViews

cap
Posts: 55
Joined: Fri Oct 17, 2008 11:47 am

Re: Some options when running programs

Postby cap » Mon Dec 08, 2008 2:23 pm

I'm not sure that I am issuing a command for a new workfile. My code merely begins with "open myfile.xls", which then creates a workfile. I guess I now realize that perhaps it is this "open" command that always creates a new workfile, which automatically bears the name of the excel file and thus isn't affected by the other option you mentioned for untitled workfiles.

With the close command then, I can see one workaround, where I could use the close command with the name of the excel file, execute this before the open command, and this would cause the first window to close and the 2nd window will then appear as the only window...

But for the sake of asking, is there a command that will load in some data from excel without automatically creating a new workfile window? Or, create a workfile window if none exists, but not if one does exist?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11406
Joined: Tue Sep 16, 2008 5:38 pm

Re: Some options when running programs

Postby EViews Gareth » Mon Dec 08, 2008 2:45 pm

You can use the READ command to read in Excel data into an existing (i.e. open) Workfile. Be warned though, the READ command is a little quirky and no where near as nice or easy to use as the OPEN command.

There isn't a command that will put data into an existing file, or create one if an existing one doesn't exist.
Follow us on Twitter @IHSEViews

cap
Posts: 55
Joined: Fri Oct 17, 2008 11:47 am

Re: Some options when running programs

Postby cap » Mon Dec 08, 2008 3:03 pm

Ok, I think I will stick with using the close command, thanks very much for your help.


Return to “Programming”

Who is online

Users browsing this forum: Bing [Bot] and 4 guests