Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: McMannus on March 25, 2017, 02:40:47 am
-
Hi guys,
I'm modeling and analyzing component architectures with a custom profile + add-in. The syntax and semantics are pretty close to SysML and therefore I'd like to have an arbitrary number of diagrams (like Internal Block Diagrams) per component. As far as I understand, EA's SysML extension derives the association of a diagram to a block only through the implicit containment in the project browser, i.e. when I move the diagram somewhere different in the model, the "formal" relation gets lost.
This is exactly the problem I'm trying to solve. The possibilities I thought about are:
1. Introduce a reference list tagged value to the component that is manually maintained in the add-in.
2. If a list of associated diagrams should be retrieved, search through the diagram elements of existing diagrams and take the ones, where the component is used largest element containing its realization.
In the past, we used Option 1 in similar use cases, but it proved to be a pain in the ass to maintain tagged value lists of GUIDs manually during deletion and creation. In addition, reuse model parts in different projects is pretty hard, because the GUIDs get outdated quickly in that case.
Option 2 is again implicit and not very robust.
Does anyone of you have a better idea, how this could be solved? The ideal solution would be a connector between an element and a diagram, but that is not possible as far as i know.
Thanks for any insight!
Jan
-
Hi Jan,
you can use Custom Reference. See: http://www.sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/crossreferences.html (http://www.sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/crossreferences.html).
With CTRL+J (Customer Reference) on the Class,.. you can choose the diagram to open. The location of the diagram is arbitrary. You may also later move it to another location.
EA stores the reference in 't_xref'. So you are also able to handle this by an AddIn or a Script.
Kind regards,
Helmut