Author Topic: Open diagram tab in already opened EA instance from external source  (Read 1123 times)

TheMintRubber

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Hi,

We have a scenario where we have to open diagrams in EA from Web Links in windows. We've implemented this by creating a launcher application that can react when a user clicks on a link in it's browser. This launcher will create an .eap file with the following content, and open it:

EAConnectString:C:\EA-Modell_Version 3.eap
OpenActions:$diagram://{1E38C463-B3F3-4f23-AE31-99FAEC99FFBA}

When this file is opened for the first time, EA will start and open the diagram with the given id.

My problem is that, when the user clicks on the link for the second time, you receive this message from EA:

The selected project is already opened!
The Desktop Version Enterprise Architect only allows single use of project files.


This also happens when the user clicks the link for the first time, but he was already working in the same file.

Is there any way to detect that an EA instance is already opened for the given file? And is there a way to just open the diagram in that instance of EA?

Regards,
Doru Foaltin.


qwerty

  • EA Guru
  • *****
  • Posts: 9433
  • Karma: +150/-138
  • I'm no guru at all
    • View Profile
Re: Open diagram tab in already opened EA instance from external source
« Reply #1 on: June 14, 2017, 06:12:27 pm »
You will need to write a short script (Python, Perl, VB or some compiled stuff) to do that for you. Out of that script you can issue the opening of an arbitrary diagram.

q.

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Arenīt we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Open diagram tab in already opened EA instance from external source
« Reply #2 on: June 14, 2017, 09:42:24 pm »
You might want to try the Enterprise Architect Connector plugin we have been working on some years ago.
It has a bit aged but still seems to work.

https://sourceforge.net/projects/eaprotocol/

Oliver