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

For questions regarding programming in the EViews programming language.

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

eclee
Posts: 9
Joined: Sat Oct 05, 2013 3:25 am

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

Postby eclee » Mon Oct 14, 2013 7:14 pm

Dear Steve:
Yes, I did it every time.

eclee
Posts: 9
Joined: Sat Oct 05, 2013 3:25 am

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

Postby eclee » Tue Oct 22, 2013 2:19 am

Ya, it is very strange....
I specified "EViews.Manager8" as the ProgID.
EVIEWS 7 ejected may be because I firstly tested the script by Matlab 2013a (32bit).
It never shown again.

BrsG
Posts: 18
Joined: Thu Aug 29, 2013 3:20 am

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

Postby BrsG » Fri Feb 28, 2014 7:48 am

Hi there,

Sorry to add to this, but I am having a very similar problem.

I am trying to call Eviews 8 (64bit, enterprise edition, updated with latest patch) from Matlab R2009b (64bit). A COM object is created, but it is empty. I followed the recommendations in this conversation (e.g. REGCOMPONENTS), but it still doesn't work.

When I list the programs Matlab has access to, Eviews is not among them. Using Excel from Matlab works fine.

Best

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

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

Postby EViews Steve » Fri Feb 28, 2014 10:00 am

Ok, here are a few things to check:

1. Make sure both EViews and MATLAB are both physically running on the same machine. No App-V installations, no virtual machines, no Citrix.

2. Make sure EViews is installed locally and is not running from a network file share.

3. Open EViews 8 64-bit, then type in command REGCOMPONENTS into the EViews command window and hit Enter. Click "Yes (All)" to re-register everything. Wait for the "All registrations completed successfully" message to appear. Re-run REGCOMPONENTS and verify that next to "COM Automation & OLE" it says "Registered". Click No to close the dialog, then quit EViews.

4. See if you can use/control EViews COM from Excel. Startup Excel with a blank worksheet, press ALT-F11 to display the developer GUI, go to Tools->Add References... and make sure "EViews 8.0 Type Library" is checked. Close the dialog, then create a new VBA subroutine named "test" in any available module. Here's what "test" should look like:

Code: Select all

Public Sub test() 'first add reference to "EViews 8.0 Type Library" Dim mgr As New EViews.Manager Dim app As EViews.Application Set app = mgr.GetApplication(NewInstance) app.Show Set app = Nothing Set mgr = Nothing End Sub
Then click the "Play" or "Run" button to run the code. Verify that a new instance of EViews 8 64-bit appears.

5. If VBA worked fine, you should be able to use EViews COM from MATLAB as well. I typed in the following commands into my copy of MATLAB 7.9.0 R2009b 64-bit:

Code: Select all

>> clear all >> mgr = actxserver('EViews.Manager.8') mgr = COM.EViews_Manager_8 >> app = mgr.GetApplication(0) app = Interface.EViews_8.0_Type_Library.IApplication >> app.Show()
and EViews 8 appeared just fine.

If you still get an error, it would be helpful to see the exact error you're seeing from MATLAB (or Excel)...

Steve

BrsG
Posts: 18
Joined: Thu Aug 29, 2013 3:20 am

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

Postby BrsG » Wed Mar 19, 2014 4:37 am

Hi Steve,

many thanks for this. I am afraid it still doesn't work.

All the previous steps worked as required, but no joy when I try it from Matlab, see the error below.

Code: Select all

>> clear all >> mgr = actxserver('Eviews.Manager.8') mgr = COM.Eviews_Manager_8 >> app = mgr.GetApplication(0) ??? No appropriate method, property, or field GetApplication for class COM.Eviews_Manager_8.
Btw, when running Eviews (REGCOMPONENTS) and later Matlab, I launched both as "run as administrator". Would be grateful for further advice.

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

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

Postby EViews Steve » Wed Mar 19, 2014 9:33 am

Ok, let's try this:

1. Open a DOS command window (with admin rights), then go to the "EViews 8" subdirectory under "Program Files" (not "Program Files (x86)").
2. Type in the following command:

Code: Select all

regsvr32 EViewsMgr.dll
3. Wait for a success message.

Close the success dialog and then restart MATLAB and try to get an EViews Manager and Application object as before.

Does this work?

Steve

BrsG
Posts: 18
Joined: Thu Aug 29, 2013 3:20 am

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

Postby BrsG » Fri Mar 21, 2014 4:37 am

Hi Steve,

many thanks for looking into this. No success so far, though, I am afraid, when I try the steps you suggested.

Not sure what to do.

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

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

Postby EViews Steve » Fri Mar 21, 2014 8:20 am

Well I'm at a loss too. If you can use EViews 8 64-bit COM Automation from Office (32-bit or 64-bit?), I don't see why MATLAB would have a problem.

The original poster had issues because he had removed his EViews 32-bit and only had EViews 64-bit installed. I wonder if you try installing EViews 8 32-bit onto the same machine if that will resolve your problem. You can have both versions running on the same machine using the same serial number...

Steve

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

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

Postby EViews Steve » Fri Mar 21, 2014 10:47 am

Ok I have a new idea you can try:

Open another DOS command window (with Admin rights) and go to the EViews 8 subdirectory again. If you're running EViews 8 64-bit, you will need to switch to the "x86" folder (so you should now be in "C:\Program Files\EViews 8\x86"). Now type in the following:

Code: Select all

regsvr32 /u EViewsMgr.dll
(this will unregister the 32-bit version of our EViews.Manager class) Click OK to close the success dialog.

Now switch back to the main "EViews 8" subdirectory, then rename the "x86" folder like this:

Code: Select all

rename x86 x86_hide
Then re-register EViews 8 by typing in this:

Code: Select all

EViews8_x64 /regcom
(You might get an error message about not finding a few items to register. Just click OK to close the dialog.)

Finally, restart MATLAB, perform a "clear all", then see if you can get EViews COM working now...

Steve

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

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

Postby EViews Steve » Mon Mar 24, 2014 3:24 pm

Have you gotten a chance to try my last suggestion? Please let me know if it worked or not...

Steve

BrsG
Posts: 18
Joined: Thu Aug 29, 2013 3:20 am

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

Postby BrsG » Thu May 01, 2014 4:05 am

Steve,

Sorry about the delay in responding. Many thanks for this. I am afraid it still doesn't work.

I may try uninstalling Eviews and Matlab and then re-installing.

Thanks again!

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

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

Postby EViews Steve » Thu May 01, 2014 7:35 am

Hmm. I was pretty sure that last bit was going to work.

In any case, a few changes have been made to EViews 8 registration in the latest patch. If you get a chance, try downloading the latest patch for EViews 8 64-bit, install it, then try your MATLAB test again.

See if that helps...

Steve

student07
Posts: 18
Joined: Tue Jun 03, 2014 5:58 am

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

Postby student07 » Tue Jun 03, 2014 6:01 am

Hey,

I have the same issue. I am using Eviews 8 and matlab 2013a, both 32bit, windows 7. I get the exact same error as the OP, and have tried all your suggestions. Is there anything else I could do to make this work?

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

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

Postby EViews Steve » Tue Jun 03, 2014 7:31 am

Ok, let's try something different.

First, try to write a short VB.NET or C# Console program to control EViews use COM automation. Our white paper discusses how to do this:
http://www.eviews.com/download/whitepap ... mation.pdf (you'll have to change the reference to be "EViews 8.0 Type Library")

Compile this program as a small EXE somewhere and make sure it works if you just double-click the EXE. Make sure it is the correct version of EViews that is being used (if you have older versions of EViews installed as well).

Next, try launching this EXE from your MATLAB program. Does this work?

Steve

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

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

Postby EViews Steve » Tue Jun 03, 2014 12:09 pm

Ok, I was able to download MATLAB 2013a myself (trial version) and was able to reproduce the problem. It definitely seems like it's an issue with MATLAB. But in any case, if I find a workaround, I'll let you all know...

Steve


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest