EViews 7 Automation API

For questions regarding programming in the EViews programming language.

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

patrice
Posts: 6
Joined: Tue Oct 12, 2010 2:10 am

EViews 7 Automation API

Postby patrice » Tue Oct 12, 2010 2:27 am

Hi,

I have installed EViews 7 on a server (with a license manager), and we have some users who use it from PC.
My question is: is-it possible to create a .net application on a PC who can use EViews features with COM using the server version ? (without install EViews on PC)
I want to create an application which can use EViews power features to make complex calcul. (I did it with Fame toolkit in the past).

If I understand well, EViews must be installed on the PC using Automation, is-it true ?

Thanks

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

Re: EViews 7 Automation API

Postby EViews Steve » Tue Oct 12, 2010 9:36 am

Hi Patrice:

If I'm understanding you correctly, you want to write a .NET program that uses COM Automation to run EViews that is installed on another computer? If so, what you're asking for is Distributed COM Automation (DCOM) or Remote Automation and the quick answer to this is yes, with some important restrictions.

You need a install a local copy of the EViewsMgr.dll on each of your remote systems in order to get Distributed COM (DCOM) to work. EViews7.exe can be kept on the server and run via DCOM but it is restricted to a single instance at a time (regardless of which type of EViews license you have). This means that while two or more remote users can access EViews, they are restricted to using the same instance (and thus must be careful not to step on each other as they open workfiles, run calculations, etc). These restrictions were put in place to enforce our normal licensing agreements.

There are other special restrictions I should mention at this point when it comes to using EViews COM Automation:
1. EViews COM Automation cannot be used from a web server process.
2. EViews COM Automation is restricted to a single instance when being used by a local windows service (not a web service).

As a side note, if you have one of our Concurrent licenses, there is no restriction on how many clients can have EViews7 installed, just the number of actual running instances at the same time (based on your license). In this case, you can install EViews7 on each of your users machines and setup COM Automation to run locally on each without the single instance restriction (local COM Automation processes can run multiple instances of EViews without any issue, as long as you have enough concurrent licenses).

If you would like to get EViews DCOM working, I can send you detailed instructions on how to set it up. If you have concerns or any requests to make about our licensing, please let me know and I can forward it to our sales team.

Steve

patrice
Posts: 6
Joined: Tue Oct 12, 2010 2:10 am

Re: EViews 7 Automation API

Postby patrice » Wed Oct 13, 2010 12:44 am

Thanks for these informations.

This is what I want to do:
- I don't want to install EViews on each machine, juste on 1 windows server. (I can have 1 dll on each machine, it's not a problem)
- my program will be deploy with ClickOnce
- Each machine can use my program at the same time and use EViews features (in this program)
- For example: my program can calculate a growth rate with eviews (eviews must be transparent for the user)

So DCOM will be the solution for me.
You said: 'Views7.exe can be kept on the server and run via DCOM but it is restricted to a single instance at a time (regardless of which type of EViews license you have)'
So in my solution, 2 users can't make a calcul at the same time ? or is there any license type to do that ? if yes, what kind of license ?
In DCOM case: the code (which make calculs with eviews and which be call by my application) can be on a web service ? a windows service ? a simple dll ?

If I understand well, COM is only use if EViews is installed on each machine, is-it true ? (it's not my case).
If you have some DCOM code, I'm interesting.

My test code in C# : (add reference to EViews.mgr.dll on my developper machine)

Code: Select all

EViews.Manager mgr = new EViews.Manager();
EViews.Application app = new EViews.Application();
app = mgr.GetApplication(EViews.CreateType.NewInstance);
app.Show();


This code display this (attached) message.
If I select one or the other choice, i have a COMEXception:
EViews could not be started. Verify that EViews can run normally.

How can my machine know the server name on which EViews is installed ? (I probably miss something, environnement variable, ...)

Thank you very much.
(PS: sorry for my bad english)
Attachments
eviews.JPG
eviews.JPG (23.14 KiB) Viewed 2217 times

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

Re: EViews 7 Automation API

Postby EViews Steve » Wed Oct 13, 2010 8:20 am

Patrice:

Yes, two users would not be able to run the calculation at the same time. The only way to do this is to do one of the following:
1. Install EViews on each machine and run your program on each machine accessing the local install of EViews (this would require a standalone EViews license for each machine or a single concurrent license that allows multiple computers to use EViews at the same time).
2. Install EViews onto a network folder that is shared, then run EViews from each machine from that share. (again using a separate standalone license for each machine or a single concurrent license that allows multiple).

The simple answer is that every EViews user (whether they are using our GUI or our COM interface) must have their own EViews license. You cannot use COM Automation to get around this requirement.

Also, your code (that does the calc using EViews) CANNOT be run as a web service or a web server (we don't allow this for obvious reasons). You can run this as a separate windows service instead, but then it is limited to a single instance of EViews at a time (so you can't serve multiple users at the same time).

I looked up your license and I believe you have a concurrent license. Since you don't want to install EViews on each machine, I would suggest option #2 above.

When you run EViews from the network share for the first time on a new machine, you'll get that popup you attached in your previous reply. Select the radio button next to: "Request a concurrent use license..." then click OK. You should then get a popup asking for name of your EViews License server. Type that in and you should be able to run EViews fine after that. The first time it runs, it will ask if you want to register the COM components on the new machine. Click Yes. Once registered, you'll be able to use COM Automation on that machine using your program.

Please double-check your EViews license to confirm that you have a concurrent license installed (a concurrent license starts with the letters '70J').

Steve


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 8 guests