BIndu_Madhav
BIndu_Madhav

Reputation: 597

How to get the referred diagram from an element in Enterprise Architect

I have a UseCase in a Usecase Diagram for which there is a reference to another composite structure diagram as shown in the figure

.enter image description here

enter image description here

Now, I want to fetch the diagram that is added to this Usecase using Enterprise Architect's Java API or from the Database. I could not find any reference to the diagram from the element int_object table or any reference to usecase from the referred diagram in t_diagram table. Is there a way to achieve this?

Upvotes: 0

Views: 581

Answers (2)

qwerty_so
qwerty_so

Reputation: 36295

To elaborate on Geert's answer: PDATA1 is used for Activity and InteractionOccurrence elements only. Any other element uses t_xref in such way that an entry with Name == DefaultDiagram is created. Client contains the element's GUID and Supplier that of the composite diagram. Moreover t_object.NType == 8 indicates that a composite diagram is used.

Personally I wouldn't have used the CompositeDiagram as I'm so much used to bypass the API (which is not always the best to do).

EA's database design can probably be best described as database scribble.

Upvotes: 1

Geert Bellekens
Geert Bellekens

Reputation: 13701

With the API you can use EA.Element.CompositeDiagram

In the database the diagramID is stored in the field t_object.Pdata1, or sometimes hidden in the t_xref table.

Upvotes: 2

Related Questions