Book a Demo

Author Topic: Problem with hyperlinks to EA models  (Read 9151 times)

colin_e

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Problem with hyperlinks to EA models
« on: March 20, 2018, 01:49:50 am »
EA: 12.0.1215

Apologies if this is a repost, the forum s/w seems to have lost my previous attempt at posting this.

I'm trying to break a model up into separate files. The EA help says hyperlinks can point at most valid file types in Windows including other EA models. However when I try i, hyperlinks to all other file types work, but a link to an EA model file does nothing, as if the file doesn't exist.

This applies whether the target EA model file is local or on O365 Onedrive.

Is this a known issue? If not is there a way to debug what's happening?

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #1 on: March 20, 2018, 02:57:08 am »
Hi Colin,

Firstly, the link must be resolvable for every user. Don't use any kind of relative or drive-letter-based path; UNC is the only thing that works.
Secondly, the program resolving the link (EA in this case) must know what to do with .EAP files. Make sure they're properly registered to be opened with EA.
Thirdly, the user account running the program must have read access to the file. Check that.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

colin_e

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #2 on: March 20, 2018, 11:32:50 am »
Well, I worked it out in the end.

After digging around trying various things, in the end almost as an afterthought I changed the link type in the diagram from "edit" (the default) to "open" and... voila it worked!

This makes no sense to me (and note the target model IS editable once it has been opened, irrespective of the fact that it was accessed via an "open" link), but what the heck, it works.


Now, if there was a way of opening a specific package or diagram in an external model via a hyperlink that would be ideal, but this will do me for now.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #3 on: March 20, 2018, 01:08:41 pm »
Now, if there was a way of opening a specific package or diagram in an external model via a hyperlink...

Have a look at the Save as Shortcut command. That allows you to choose diagrams to open on launching the shortcut.
The Sparx Team
[email protected]

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #4 on: March 20, 2018, 08:38:34 pm »
This makes no sense to me (and note the target model IS editable once it has been opened, irrespective of the fact that it was accessed via an "open" link), but what the heck, it works.
"Edit" actions (not type) are valid for "file" type links and not much else AFAIK.

EA first checks if the file extension is something it thinks it can make sense of, like .txt or .xml. If so, it opens the file in one of its internal editors.

If the extension is not recognized, I believe the two actions fall through to Windows. In Windows, you can register "open" and "edit" applications per file type. These two do not have to be the same. .xml files are often a good test case; right-click an .xml file in the Windows Explorer and try the Open and Edit menu items -- quite often they will lead to different applications being started (but of course this depends on your Windows configuration).

When EA installs, it registers itself as the "open" application for .eap files -- but not as the "edit" application. (You can verify this by right-clicking an .eap file in the Explorer; there will be an Open but no Edit menu item.)

So if you create a "file" hyperlink in EA and specify the "open" action for an .eap file, when you ask EA to follow the link it tells Windows to "open" the file, which causes another EA instance to be started.
If on the other hand you specify the "edit" action, when EA is asked to follow the link it tells Windows to "edit" the .eap file -- and Windows doesn't know how to do that, so nothing happens.

It would be reasonable to expect EA to say something in this case, such as "no 'edit' action is defined for this file extension". You should file a feature request, or possibly even a bug report.


/Uffe
My theories are always correct, just apply them to the right reality.

colin_e

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #5 on: March 20, 2018, 11:19:22 pm »
Have a look at the Save as Shortcut command. That allows you to choose diagrams to open on launching the shortcut.

Great tip, thanks. I'll have a look.

colin_e

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #6 on: March 20, 2018, 11:21:28 pm »
Thanks to Uffe for the very complete explanation.

I guess if nothing else, it would help if the EA installer set the EA application up as both the Edit and Open handler for EA files.

colin_e

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #7 on: March 21, 2018, 04:26:23 am »
Note: anyone else having problems with the forum software? If I preview a posting, it then can't be posted because the s/w says it has been posted already...


Have a look at the Save as Shortcut command. That allows you to choose diagrams to open on launching the shortcut.

Ok, that works, but it's not ideal.

What you end up with is:

  • EA Model file 1, containing a hyperlink that points at an-
  • "EA Shortcut" (it's an EAP file, but it's tiny and points at another model file somewhere else)
  • The actual target EA model file

This means if you want to set up multiple links into a second file, you end up with all these little "pseudo model" files sitting around in the file system. If you accidentally move, rename or delete one of them, the link will stop working.

I was hoping to find a way of creating a hyperlink in the EA model that tells EA to open an external EA model file directly at a specified package or diagram. It's a shame EA creates these proprietary shortcuts in EAP format, rather than normal Windows shortcuts containing a file URL.

Microsoft OneNote can create URLs that link to specific content, I can have links in the EA model that go directly to specified notebooks, sections or pages in OneNote, which is rather nifty. It would nice if EA could support cross-file links in a similar way.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #8 on: March 21, 2018, 01:36:16 pm »
[SNIP]

I was hoping to find a way of creating a hyperlink in the EA model that tells EA to open an external EA model file directly at a specified package or diagram. It's a shame EA creates these proprietary shortcuts in EAP format, rather than normal Windows shortcuts containing a file URL.

[SNIP]
EA creates them with the extension .eap,  but they aren't in EAP file format. 

We use shortcut files all the time, but trying to resolve the repository reference from them is PITA.

FWIW, we prefix ALL our shortcut files with the "@" symbol - so we know they aren't REAL .eap (MS_Access) files.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #9 on: March 21, 2018, 08:20:00 pm »
Have a look at the Save as Shortcut command. That allows you to choose diagrams to open on launching the shortcut.
Ok, that works, but it's not ideal.
If you want true hyperlinks that point to specific diagrams in an EA project, which can be used from within another EA project or in a web page or wherever, that's not what EA's hyperlinks and shortcut files offer.

It can be implemented, however. I did this a few years back, but I never brought it to market. I dropped it after I saw there was an open source effort to achieve the same thing. Pretty sure that's been abandoned in turn now, though.

/Uffe
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problem with hyperlinks to EA models
« Reply #10 on: March 21, 2018, 09:00:23 pm »
The open source thing was called EA Protocol handler.
It seems to have gone dormant for quite a while now.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Problem with hyperlinks to EA models
« Reply #11 on: March 21, 2018, 10:45:12 pm »
That was it, yeah. I had the same basic solution: create a new URI scheme (I think I called mine eamodel), and implement a protocol handler which opens the specified EA resource.

Pretty straightforward piece of kit really. Had some limitations, of course, but basically did what you need.

/U
My theories are always correct, just apply them to the right reality.