Author Topic: convert EA elements  (Read 10218 times)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: convert EA elements
« Reply #15 on: December 04, 2013, 08:55:34 am »
I think it will be:

EA.Diagram diagram = Repository.GetDiagramById(element.MiscData(0))
The Sparx Team
[email protected]

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: convert EA elements
« Reply #16 on: December 04, 2013, 05:45:48 pm »
Quote
I think it will be:

EA.Diagram diagram = Repository.GetDiagramById(element.MiscData(0))

No that won't work. The element doesn't know which diagrams it is used on.

But this question is getting a bit silly.
You start from a diagram object, then loop all diagramObjects and get their element object, then then you try get get the diagram agaain? But you already have that object?

I'm confused :-?

Geert
« Last Edit: December 04, 2013, 05:47:19 pm by Geert.Bellekens »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: convert EA elements
« Reply #17 on: December 04, 2013, 05:48:42 pm »
KP is correct, Geert. The Hyperlink element has the linked diagram in MiscData(0).

Honestly, I was confused the same way as you first.

q.
« Last Edit: December 04, 2013, 05:49:16 pm by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: convert EA elements
« Reply #18 on: December 04, 2013, 05:51:37 pm »
Quote
KP is correct, Geert. The Hyperlink element has the linked diagram in MiscData(0).

Honestly, I was confused the same way as you first.

q.
Ah now I see. I missed the fact that we were talking about a hyperlink element. :-[

Geert