Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: zalbina on November 25, 2012, 11:04:51 pm

Title: API: Diagram
Post by: zalbina 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.
Title: Re: API: Diagram
Post by: qwerty 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.
Title: Re: API: Diagram
Post by: zalbina 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?

Title: Re: API: Diagram
Post by: qwerty on November 26, 2012, 07:33:27 am
PDATA == MISCDATA; but there's no equivalent for NType

q.
Title: Re: API: Diagram
Post by: zalbina 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.
Title: Re: API: Diagram
Post by: qwerty on November 26, 2012, 09:32:55 pm
PDATA1 == 0 -> text
PDATA1 > 0 -> Hyperlink

q.
Title: Re: API: Diagram
Post by: Eve on November 27, 2012, 12:38:01 pm
PDATA <> 0 -> Hyperlink. Otherwise it will fail on replicated databases. (Equivalent for anything referencing an ID)
Title: Re: API: Diagram
Post by: zalbina on November 27, 2012, 06:02:01 pm
Thank you very much for your fast answers:).