Author Topic: API: Diagram  (Read 5857 times)

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
API: Diagram
« on: November 25, 2012, 11:04:51 pm »
Hello,

I would like to "drag and drop" a diagram on another one diagram. I can do it as "Diagram Frame" or "Diagram Reference" or "Hyperlink". It does not matter what I can choose the matter is how can I find the original diagram from which actually copy is done. I must use the EA API.

Thank you for your replies.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: API: Diagram
« Reply #1 on: November 26, 2012, 12:02:29 am »
See my book page 7: PDATA1:For UMLDiagrams: Diagram_ID of the underlying diagram;
here NType == 0 means Frame and 1 Reference


q.

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: API: Diagram
« Reply #2 on: November 26, 2012, 12:23:31 am »
Thanks for the fast replay. Should I write SQL query or does something exist in EA.Element or other objects?


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: API: Diagram
« Reply #3 on: November 26, 2012, 07:33:27 am »
PDATA == MISCDATA; but there's no equivalent for NType

q.

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: API: Diagram
« Reply #4 on: November 26, 2012, 06:11:49 pm »
Thanks, it's clear, but I see some problem with Hyperlinks. Object_Type of it is Text that is very confusing. Let say Object_Type of Notes object is also Text. How can I know who is who? I have some loop by DiagramObjects and when I check the type of Hyperlinks and other different objects they can be same (Text) and NType also.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: API: Diagram
« Reply #5 on: November 26, 2012, 09:32:55 pm »
PDATA1 == 0 -> text
PDATA1 > 0 -> Hyperlink

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: API: Diagram
« Reply #6 on: November 27, 2012, 12:38:01 pm »
PDATA <> 0 -> Hyperlink. Otherwise it will fail on replicated databases. (Equivalent for anything referencing an ID)

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: API: Diagram
« Reply #7 on: November 27, 2012, 06:02:01 pm »
Thank you very much for your fast answers:).