Page 1 of 1

EViews COM Automation Server- Example Code ?

Posted: Tue Jan 29, 2019 10:50 am
by MT_MANC
The Help entry on "EViews COM Automation Server" states:
EViews may be used as a COM Automation server so that an external program or script may launch and control EViews programmatically
I see there is some Python accessibility to Eviews too.
I have a general question about running Eviews (re-)estimation from a server-side script (maybe .NET) eg every time a datafeed/source is updated.
Are ther any working (code) examples of this eg an external (.NET or Python) script triggering a pre-existing Eviews .PRG that eg performs a pre-configured MIDAS (re-)estimation ? Would the COM/Python functionality extend to being able to update some parameters inside the
.PRG eg the data period for estimation ?

Re: EViews COM Automation Server- Example Code ?

Posted: Tue Jan 29, 2019 11:27 am
by EViews Gareth
No examples, unfortunately.

Both COM and Python allow you to issue single EViews commands at a time. This could be to execute a previously written EViews program, or you can just dynamically act like a program from within the source application, changing parameters.

If you do want to just execute a previously written EViews program, in order to modify it you'd have to modify the file on disk (which is simple enough - they're just text files).

Re: EViews COM Automation Server- Example Code ?

Posted: Tue Apr 09, 2019 7:16 am
by MT_MANC
..has any of this functionality changed or been augmented with Eviews 11 release ?

Re: EViews COM Automation Server- Example Code ?

Posted: Tue Apr 09, 2019 7:45 am
by EViews Gareth
Python calling EViews has not changed in 11.

11 did add the ability for EViews to run/call Python.

Re: EViews COM Automation Server- Example Code ?

Posted: Tue Apr 09, 2019 8:29 pm
by EViews Steve
If you haven't already, look at our python code written in the pyeviews python 2 package (see the /pypeviews/__init__.py file located inside the download zip file). Specifically, look at the functions PutPythonAsWF and GetWFAsPython.

It uses COM to launch and send data to EViews, run EViews commands, then return the results back into Python without having to run an EViews program.