archi
archi copied to clipboard
Show Relationship Name option in diagram
Adding the relationship name to the connector has been a great help for the adoption of Archimate diagrams when i started creating sharing them with my audience. Initially i used to get a confused face when my audience saw a model for the first time. I had to manually add relationship text to each connector to make sure everybody can read and understand it without textual description added which is time consuming. To make models readable it would be great to have an setting to switch ON and OFF the relationship text. Example of what im talking about attached below
This could easily be done using a jArchi script.
A (very) basic implementation could be (with a single view as the selection):
$(selection). find("relationship").each(function(r) {
r.name = r.type;
})
Of course, a real script would:
- check if the relationship has a name set and would save it in a property before changing it,
- convert relationship names to verbs,
- allow to revert to the saved name (if any)
This jArchi script allows to replace the label by changing the relationships name, which may not be what you're searching for.
My I suggest an alternative solution ...
To change the label without changing the relationships name, you may use my specialization plugin and set your relations label to something like ${${view:property:relationships_label}}.
By default, the relationships labels will not be shown:
If you create a property relationships_label with value name in your view, the relationships labels will be shown:
How it works: The labels are compound of two variables, one enclosed into the other --> the inner variable will be analyzed before the outer one:
- The inner variable ${view:property:relationships_label} will be replaced by the value of the property relationships_label of the view (so either an empty value or name in my example)
- The outer variable will therefore be either ${} which will lead to an empty label, or ${name} wich will be replaced by the name of the relationship
Please note that when you modify the view property, the view needs to be refreshed in order to show or hide the labels. The easiest way is to close and reopen it.
Please do not hesitate to open a case on my plugin's GitHub in case you require more information.
Hope this helps
Best regards Hervé
Use the ArchiAnnotation plugin v0.3. Set property %HCL for diagram - Hide Connection Label locally.
This is kind of an old thread to reignite, but I found an interesting workaround in that you can select a whole batch of relationships in the outline view of the Models window and then type a name in the Main Properties box and rename them all at once, causing those names to appear in diagrams that include those relationships. I understanding that renaming them might not be the actual intent but for me, lacking an actual display label field on the objects, it was quite a bit simpler than some of the other strategies discussed here.
Actually I have some code to hide/show relationship names. It's in the "features" branch here in GitHub. Just waiting for other things to mature first,
This is implemented