Book a Demo

Author Topic: Hyperlink to a specific element of a diagram?  (Read 5015 times)

G Ignacz

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Hyperlink to a specific element of a diagram?
« on: October 23, 2015, 05:45:32 am »
Hello,

I know it is possible to make a hyperlink on a diagram to another diagram. It is also possible to make a hyperlink to a model element - it will be highlighted in Project Browser.

Is it possible somehow to set a hyperlink from a diagram to a specific element of another diagram? On click the editor shows the diagram and the linked element is selected (highlighted).
Similarly as like the '#' anchor in HTML URLs.

Would be great for model navigation.

Thank you,
Gergely.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Hyperlink to a specific element of a diagram?
« Reply #1 on: October 23, 2015, 06:37:39 am »
Unfortunately no. What I did once was writing an add-in that looked for model elements with a guid placed in the clipboard (http://liquit.biz/brain/enterprise.html#hyperlink). Maybe you can do something along those lines.

q.

G Ignacz

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Hyperlink to a specific element of a diagram?
« Reply #2 on: November 03, 2015, 06:17:06 am »
Thank you very much, Qwerty,

I will check your script.
I found a lot of interesting things on your page.

G.

G Ignacz

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Hyperlink to a specific element of a diagram?
« Reply #3 on: November 30, 2015, 09:54:31 pm »
Hi,

do you know if there is an EA API function for selecting an element on a diagram?

If yes, the solution could be:
- create a tagged value for referencing the target diagram
- create a tagged value for referencing the element
- create an addin, which
   1) is activated by context menu
   2) reads the tagged values containing the diagram and element references
   3) determines the diagram element reference
   4) passes the diagram element reference to the EA API to select it

... well, at least theoretically...

Bets regards,
Gergely

« Last Edit: November 30, 2015, 09:56:12 pm by gignacz »

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Hyperlink to a specific element of a diagram?
« Reply #4 on: November 30, 2015, 10:33:48 pm »
Hi Gergely,


You can select and deselect objects in a diagram by adding them to / removing them from the Diagram.SelectedObjects collection.

Whether this also re-pans / re-zooms the diagram to ensure the selected objects are in the field of view I don't know, but my guess is it doesn't.

I agree that this anchor-type hyperlink function would be useful, so perhaps you should write it up in the Suggestions and Requests forum and see if anyone else agrees.


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

G Ignacz

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Hyperlink to a specific element of a diagram?
« Reply #5 on: December 01, 2015, 12:17:40 am »
Thank you, Uffe!

I will propose to have it; or if I'll have the time I'll try to write that add-in.

Best regards, Gergely