Page 3 of 3

Re: Call EViews 8 (64 bit) from Matalb 2013a (64 bit)

Posted: Tue Jun 03, 2014 3:59 pm
by EViews Steve
Wow, this one is difficult to figure out...

At best as I can determine, MATLAB seems to be remembering where the original type library was initially found for a given ProgID (in our case "EViews.Manager"). Once "remembered, MATLAB will continue to look for that file in the original location regardless of what the Windows registry is saying. This means that if the first time you wrote your MATLAB program you were using EViews 7, and then you upgraded to EViews 8 and uninstalled EViews 7, you would find that MATLAB is no longer working with EViews.

I haven't been able to figure out how to reset this cache (I've tried "clear all" and "rehash" without success) other than possibly uninstalling MATLAB, then re-installing it.

However, I did figure out an easy workaround. MATLAB only needs the EViews 7 file that contained the type library, which was: EViewsMgr.dll.

Actually, ignore this workaround -- I've figured out a better one -- see other postings below...
So I've made a modified public version of this file available for download. It needs to placed in the exact same location as where your previous EViews 7 installation was located. By default this location is:

(Windows 32-bit) c:\Program Files\EViews7 (note there is no space between "EViews" and "7")
(Windows 64-bit) c:\Program Files (x86)\EViews7 (note there is no space between "EViews" and "7")

Here's the download link for the modified file:
http://eviewsdropbox.s3.amazonaws.com/EViewsMgr.dll

Once you have this file in its original directory, you should be able to use EViews 8 via COM Automation from MATLAB 2013a.

If I ever figure out how to reset MATLAB, I'll post that too...
Steve

Re: Call EViews 8 (64 bit) from Matalb 2013a (64 bit)

Posted: Tue Jun 03, 2014 5:37 pm
by startz
Steve,

Have you contacted Matlab? Their tech support is generally quite good.

Re: Call EViews 8 (64 bit) from Matalb 2013a (64 bit)

Posted: Wed Jun 04, 2014 9:53 am
by EViews Steve
I believe you need to have an active license with MathWorks before they will entertain any bug reports. We actually have an old license from 2009, but it's expired now.

I'm actually thinking it might be easier for me to modify the EViews 8 registration package and release this as a patch so that our MATLAB users can continue to use EViews COM. It'll probably be faster anyways...

Steve

Re: Call EViews 8 (64 bit) from Matalb 2013a (64 bit)

Posted: Wed Jun 04, 2014 11:50 am
by EViews Steve
Ok I figured out a better workaround.

It turns out, MATLAB 2013 is always looking for version 1.0 of the type library for any given ProgID, even if you specify a different version to use (such as actxserver('EViews.Manager.8')). Without the 1.0 type library, MATLAB fails to load the Manager object correctly.

So I modified our EViews 8 installer to also include the type library file from EViews 7. When EViews 8 registers itself, it now also register's the type library file from EViews 7 just so MATLAB users can find it.

This fix will be in the new EViews 8 patch released sometime today or tomorrow.

Steve

Re: Call EViews 8 (64 bit) from Matalb 2013a (64 bit)

Posted: Wed Jun 04, 2014 2:36 pm
by EViews Steve
Patch with this fix is now available. Within EViews, goto Help->EViews Update to get the latest patch. Or you can download and install it manually from our website: http://www.eviews.com/download/download.html

Steve

Re: Call EViews 8 (64 bit) from Matalb 2013a (64 bit)

Posted: Fri Jun 06, 2014 11:43 am
by student07
Sorry for the late reply, but thanks a lot for your help! I really appreciate it. I will try out the new patch and see if that works. Thanks again.

Re: Call EViews 8 (64 bit) from Matalb 2013a (64 bit)

Posted: Fri Jun 06, 2014 1:46 pm
by student07
The patch works! Thanks so much! One more question that I have now: is it possible to call a whole eviews program (.prg) from Matlab instead of running only single lines in quotes? If not, is it at least possible to paste a whole block of my eviews code in matlab without having to enclose every line in h.run(' ')? Thank you in advance.

Re: Call EViews 8 (64 bit) from Matalb 2013a (64 bit)

Posted: Fri Jun 06, 2014 2:21 pm
by EViews Gareth
You can issue the EViews run command to run an entire program.