Author Topic: Assign Composite Diagram to Grouping  (Read 5535 times)

Viking

  • EA User
  • **
  • Posts: 433
  • Karma: +2/-2
    • View Profile
Assign Composite Diagram to Grouping
« on: November 13, 2024, 12:53:07 am »
Hi,

In "https://sparxsystems.com/forums/smf/index.php/topic,48647.0.html" we agreed that a Grouping is a composite element.

I would like to assign a Composite Diagram to it (more for navigation purposes (double-click) than really to reflect a composition). But this is not offered by SparxEA out of the box, which should be from my point of view.

My questions are:
1) can this be achieved via a database entry?
2) is there anything else to achieve this behavior? Hyperlink is the only way I have seen so far, but even as a group the assigned element it does not look or behave as desired).

Many thanks in advance, V.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13303
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Assign Composite Diagram to Grouping
« Reply #1 on: November 13, 2024, 01:09:32 am »
In the past I've successfully added composite diagrams to things that were not supposed to have composite diagrams using the API (or database updates through Repository.Execute)

I didn't test with ArchiMate Groupings, but there's a good chance it will still work.

Geert

Viking

  • EA User
  • **
  • Posts: 433
  • Karma: +2/-2
    • View Profile
Re: Assign Composite Diagram to Grouping
« Reply #2 on: November 13, 2024, 02:12:11 am »
In the past I've successfully added composite diagrams to things that were not supposed to have composite diagrams using the API (or database updates through Repository.Execute)
I didn't test with ArchiMate Groupings, but there's a good chance it will still work.
Geert

Thanks, @Geert. Like this?

groupingElement.CompositeDiagram = existingDiagram.DiagramID
« Last Edit: November 13, 2024, 04:28:25 am by Viking »

Viking

  • EA User
  • **
  • Posts: 433
  • Karma: +2/-2
    • View Profile
Re: Assign Composite Diagram to Grouping
« Reply #3 on: January 28, 2025, 11:09:21 pm »
It works with the correct command:

String guid = "...";
element.SetCompositeDiagram(guid);