Book a Demo

Author Topic: Externally open EA and show a certain diagram  (Read 5902 times)

michael.jeier

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Externally open EA and show a certain diagram
« on: July 28, 2008, 06:53:32 pm »
Hi,

I want to automatically open EA from another tool, i.e. I want to have something like an URL or link which the user can click and then opens EA on a certain diagram. Is this even possible??? I tested the Java API a bit, but I could not make the EA instance visible which was created.

Someone please help!

Regards, Michael

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Externally open EA and show a certain diagram
« Reply #1 on: July 28, 2008, 08:58:55 pm »
There's nothing like this 'out of the box' from the EA side. You might be able to cobble something together though, depending on how you need it to work.

You can save a pointer to an EA project as if it were an EAP file (so it shows up as a desktop icon say). When you double-click the icon EA will open the appropriate project. When you do this you can set up a default diagram and such.

Perhaps there's some way you could save such a thing from an application, then trigger Windows (or whatever) to open the 'file' as usual. That might give you something to work with.

As far as just opening a project and diagram from a Web page hot link you're likely out of luck.

David
No, you can't have it!

michael.jeier

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Externally open EA and show a certain diagram
« Reply #2 on: July 28, 2008, 10:09:46 pm »
Well this might be allright:

Quote
You can save a pointer to an EA project as if it were an EAP file (so it shows up as a desktop icon say). When you double-click the icon EA will open the appropriate project. When you do this you can set up a default diagram and such.

Hmmm, I searched the documentation, but I cannot find anything. How do I create those pointers???

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Externally open EA and show a certain diagram
« Reply #3 on: July 28, 2008, 11:08:34 pm »
Sorry, "pointer" is the wrong word.

Check the EA help index for Save As, and you'll see several useful entries.
No, you can't have it!

michael.jeier

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Externally open EA and show a certain diagram
« Reply #4 on: July 29, 2008, 07:49:49 pm »
Hi,

ah, got it - thanks!  :)

When I open the shortcut file with an editor it looks like this:

Code: [Select]
EAConnectString:C:\Test.eap
OpenActions:$diagram://{DE1DF219-A90A-4056-AE48-D1FDA8E6F816}

Hmm, there's the path to the original file and an unique identifier to the diagram which should be opened. Well, a couple of questions are just popping into my head:

1. Can one do the same with a database repository instead of a file? (I tried to create a database repository to test this but I didn't get it to work, yet.)
2. Is it possible to get this unique identifier from the API?
3. Are diagrams the only thing which can be opened this way?
4. Is it generally possible to add a (toolbar?)-button to EA, which could generate such a shortcut file or something similar??

Thanks in advance for any help on these questions!

Regards, Michael

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Externally open EA and show a certain diagram
« Reply #5 on: July 30, 2008, 12:25:18 am »
AFAIK:

1) Yes, that's the primary purpose of this feature. In fact the string that's stored includes the connection string (I believe).

2) Yes. As long as you can figure out which diagram is the model default, which might or might not be stored somewhere convenient, you can retrieve the GUID of any diagram. Worst case is that you'd have to open the model and grab the GUID of the current diagram before you changed anything.

3) Read the help file references I provided; the dialog gives you the list of things you can set up.

4) Not sure what you mean. You can create add-ins for EA, but they have limited interaction with the EA menu bar (at least to this point).

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Externally open EA and show a certain diagram
« Reply #6 on: July 30, 2008, 08:18:49 am »
You can create a shortcut like this for any model.  And if you set EA up with the views you want opened when you open the shortcut it will fill the dialog appropriately.

michael.jeier

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Externally open EA and show a certain diagram
« Reply #7 on: August 06, 2008, 01:25:02 am »
Hi,

thanks again! I made a "home diagram" for every use case so that the use cases can be linked.  8-)

And I added a custom program to the tools with a shortcut. But I don't want to add another tool for every functionality I program. Is there a way to add those functions to the popup menu of elements???

Btw, which API is the more powerful and has the best performance? Java or C#? I tried both and noticed that the API does not use an existing instance of EA, but opens its own. This makes it kinda slow. Can one use the already open instance of EA (if there's one)????

Regards, Michael

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Externally open EA and show a certain diagram
« Reply #8 on: August 06, 2008, 03:24:51 am »
The two API implementations are quite similar. In fact, the Java API is a port - through a bridge - of the other, which dates back to COM days.

I do not think you can use the equivalent of the COM GetObject method to attach to a running instance of EA, but I could be wrong. I'm almost sure this restriction applies to the Java API though.
No, you can't have it!

Eric Johannsen

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-0
  • Model Driven Business[ch0174]
    • View Profile
Re: Externally open EA and show a certain diagram
« Reply #9 on: September 08, 2008, 01:35:04 am »
Canonic is about to release the beta of an ea:// protocol handler.

See http://canoniccorp.com/products-labs.aspx