EViews COM Automation Server- Example Code ?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

MT_MANC
Posts: 23
Joined: Tue Mar 10, 2009 5:22 am

EViews COM Automation Server- Example Code ?

Postby MT_MANC » Tue Jan 29, 2019 10:50 am

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 ?

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

Re: EViews COM Automation Server- Example Code ?

Postby EViews Gareth » Tue Jan 29, 2019 11:27 am

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).
Follow us on Twitter @IHSEViews

MT_MANC
Posts: 23
Joined: Tue Mar 10, 2009 5:22 am

Re: EViews COM Automation Server- Example Code ?

Postby MT_MANC » Tue Apr 09, 2019 7:16 am

..has any of this functionality changed or been augmented with Eviews 11 release ?

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

Re: EViews COM Automation Server- Example Code ?

Postby EViews Gareth » Tue Apr 09, 2019 7:45 am

Python calling EViews has not changed in 11.

11 did add the ability for EViews to run/call Python.
Follow us on Twitter @IHSEViews

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: EViews COM Automation Server- Example Code ?

Postby EViews Steve » Tue Apr 09, 2019 8:29 pm

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.


Return to “Programming”

Who is online

Users browsing this forum: Google [Bot] and 28 guests