archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
952 stars 268 forks source link

Expand an element in a view to all connected elements not yet shown #917

Open wimcraig opened 1 year ago

wimcraig commented 1 year ago

It is very useful to be able to create a view from any (set of) elements in a model. It would even be nicer if I could then expand the view for one or more selected elements in the view such that the further connected elements would appear in the same view and not lead to yet another view being generated.

Phillipus commented 1 year ago

Hi, I don't understand what you mean. Could you simplify or illustrate this?

wimcraig commented 1 year ago

In the following situation, I would like to have the option to add all connected elements to the current view, rather than generate them in a new view.

2023-03-02_14-43-11

Phillipus commented 1 year ago

OK, I understand.

One way to do this:

  1. Select the element in the view
  2. In the Properties window select the "Analysis" tab
  3. If the element has any relationships these can be selected in the "Analysis" tab and dragged onto the View
  4. All connected elements are added

If that's not sufficient a simple jArchi script could achieve the same result and with more control over what gets added to the View.

wimcraig commented 1 year ago

Thanks for the quick response. The approach via the 'Analysis' tab indeed works well as long as only one item is selected in the view (I did not know it would work that way). For users not familiar with this trick, it could nevertheless be handy to have this executed via an item on the right-click menu that would also consider multiple items selected (as the 'Generate View for...' item does). (I am not really into scripting so am dependent on functions as provided by the tool)

I leave it to you to decide whether you close this request or keep it on the backlog

Phillipus commented 1 year ago

I leave it to you to decide whether you close this request or keep it on the backlog

As this can be achieved for single elements as described above, or with a jArchi script, it's not really a high priority feature. But I'll leave it open in case it turns out to be a popular request (i.e "Add all/some related elements for the current selection to the current view"). The hardest part would be coming up with a decent algorithm to place the elements tidily on the View.

wimcraig commented 1 year ago

But I'll leave it open in case it turns out to be a popular request (i.e "Add all/some related elements for the current selection to the current view"). The hardest part would be coming up with a decent algorithm to place the elements tidily on the View.

As a user I would only have the requirement that added elements get placed somewhere previously 'empty' and are easily identifiable. So I would be happy if the view gets extended below the lowest item and all new elements are added there in a single row (or a number of rows if there are many). For sure the user will want to position them to their liking afterwards anyway, but the new items need to be easily found.

aborgmann-zech commented 1 year ago

Hi, I had the same use case and wrote three different jArchi scripts as a work around:

  1. Add all related elements and relations from model for selected element(s) to view as a grid in the left upper corner
  2. Add all relations from model to selected element and other existing elements in view
  3. Add all relations from model to selected elements Especially the first script runs extremely long in big models, cause of checking every relation for every element. If needed I can provide them as is, but cannot offer any support or modification.