Author Topic: Get Diagram of a Hyperlink  (Read 5272 times)

Hoefler1

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Get Diagram of a Hyperlink
« on: March 29, 2016, 04:38:14 pm »
Hello,

Having a DiagramObject (e.g. as a Hyperlink, DiagramFrame etc.) that links to another diagram in my Project (on doubleclick),
how can I access the diagram it links to, itself?

Thank you all in advance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13241
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Get Diagram of a Hyperlink
« Reply #1 on: March 29, 2016, 05:23:35 pm »
In case of a hyperlink to a diagram the diagramID is stored in PDATA1 aka MiscData(0)

Geert

Hoefler1

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Get Diagram of a Hyperlink
« Reply #2 on: March 29, 2016, 07:02:40 pm »
Hello Geert,

the MiscData is only available if there was a Connector.
But in my case I only have this Hyperlink-Object on a Diagram, as it can be chosen when dragging a diagram from project browser onto another diagram.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13241
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Get Diagram of a Hyperlink
« Reply #3 on: March 29, 2016, 07:37:41 pm »
Hello Geert,

the MiscData is only available if there was a Connector.
But in my case I only have this Hyperlink-Object on a Diagram, as it can be chosen when dragging a diagram from project browser onto another diagram.

I don't think that is true. There's Miscdata on an EA.Element as well.

Geert

Hoefler1

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Get Diagram of a Hyperlink
« Reply #4 on: March 29, 2016, 07:59:47 pm »
I don't think that is true. There's Miscdata on an EA.Element as well.

Geert

I'm sorry. You're right.
I had to use Element.get_MiscData(0) to access the DiagramID. Looks like it would work  ;)

Thanks!