Book a Demo

Author Topic: [EA13.5] - Open EA and display diagram/element by GUID  (Read 6836 times)

muehring

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
[EA13.5] - Open EA and display diagram/element by GUID
« on: November 17, 2018, 02:50:03 am »
Hi,
i would like to know how to load a certain EA project and to tell EA to show a specified diagram/interface, at least in the project browser.
Open a viewable element, like a diagram at the same time would be a plus.

The GUID for the element is known.
I do not want to set a default diagram for startup, as it changes with each start. In addition I also do not want to simply open all possible diagrams.

I am looking for something like:
ea.exe <project_name.eap> <guid>

Alternatively an addin is fine as well, if startup parameters can be passed to an addin.

The idea behind is, if somebody is asking for an architectural design in my EA file, I would simply send a link to my architecture,... .


In addition I would like to know, where the EA command line parameter overview can be found. I did not find a usable list and the cli help function  (--help or /?) is not implemented by Sparx.

Target EA version: 13.5

Thank you in advance

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: [EA13.5] - Open EA and display diagram/element by GUID
« Reply #1 on: November 17, 2018, 08:33:01 am »
Actually I did that years ago. An add-in was just looking into the paste buffer and detect (with is a simple regex) if its a GUID. Now you can look with Repository.GetXxByGUID where Xx can be package, element or diagram. Since GUIDs are unique you get exactly what had been passed.

q.

muehring

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: [EA13.5] - Open EA and display diagram/element by GUID
« Reply #2 on: November 20, 2018, 12:20:50 am »
Hello qwerty,
thanks for your reply. Yes, actually getting the GUID is simple (and I even have an app already monitoring my clipboard).

But the main question is how to start EA and to  open the diagram with the specified GUID on startup automatically (or to browse to the element in the project browser, based on Repository.GetXxByGUID)

Thanks,



qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: [EA13.5] - Open EA and display diagram/element by GUID
« Reply #3 on: November 20, 2018, 12:58:01 am »
Use an add-in that hooks to EA_Connect. There you can do what needs to be done.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: [EA13.5] - Open EA and display diagram/element by GUID
« Reply #4 on: November 20, 2018, 07:09:58 pm »
There used to be an open source project called "EA Protocol handler" or something like that that did exactly this.
I remember testing it a long time ago, but the hyperlinks got too long for Word to handle.

You might be able to resurrect that.

Another option is to use the EA Navigator add-in I developed. It has a feature to select an item based on the GUID in the clipboard (just like qwerty's add-in)

Geert

muehring

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: [EA13.5] - Open EA and display diagram/element by GUID
« Reply #5 on: November 20, 2018, 11:43:12 pm »
Hello Gert,
thanks a lot for the EA Protocol handler hint (still available at source forge) and also your addin. Will check it.
BR,