Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Viking on November 13, 2024, 12:53:07 am

Title: Assign Composite Diagram to Grouping
Post by: Viking 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.
Title: Re: Assign Composite Diagram to Grouping
Post by: Geert Bellekens 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
Title: Re: Assign Composite Diagram to Grouping
Post by: Viking 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
Title: Re: Assign Composite Diagram to Grouping
Post by: Viking on January 28, 2025, 11:09:21 pm
It works with the correct command:

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