Page 1 of 1

COM automation

Posted: Wed May 29, 2013 4:15 am
by nupogodi
Hi,

1. I would like to execute multiple statements concatenated to a string in .NET.
What symbol would denote the line break or beginning of the next command? The following syntax returns an error message:

string s = "wfopen c:\mywork.wf1" + " pageselect page1 " + " equation eq1.ls a b c "
app.Run(s)

2. I wonder whether the COM automation will be supported in the next versions of Eviews?

Re: COM automation

Posted: Wed May 29, 2013 8:00 am
by EViews Steve
Because EViews COM Automation needs to be able to return a possible error message, you actually can't send in multiple commands in a single Run call.

What you can do is create an EViews program by creating a text file with the commands you want to run delineated by carriage returns, then save the text file with a PRG extension (e.g. commands.prg). Then ask EViews to run the program like this:

Code: Select all

app.Run("run c:\commands.prg")
If you want the program to quit EViews when it is done, make the last command be "EXIT".

All Windows versions of EViews 7 and beyond will have support COM Automation.

Steve