Search code examples
enterprise-architect

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?


Solution

  • 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.