Book a Demo

Author Topic: Insert Related Elements - Q  (Read 7120 times)

kewldee

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Insert Related Elements - Q
« on: November 16, 2018, 06:58:57 am »
Hi experts, I have a few questions reg EA capabilities and was wondering if you could shed some light on these?

1. Insert Related Elements: (accessible via right click on a class): When I use this to insert all related elements, even at Level 1 depth, in addition to adding the related elements to the diagram, EA is automatically adding relationships between the 'related' elements also which is causing a cesspool of connectors on the resulting diagram. We have around 600 classes which is compounding the issue. Is there a way to make EA show only the related elements on the diagram, using this feature, and not all the relationships between the related elements ? Any add - ins that can achieve this ?

2. This question is little far fetched but just wondering if anyone played with this idea. Would it be possible to auto-generate a 'related elements' diagrams based off a SQL query result set? Does EA have such a capability ?

3. Is there a way we can select all the connectors on a diagram akin to selecting all the elements by hitting Ctrl+A.

If answers to these are available on some other post, please point me in that direction.

Thanks
KK

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Insert Related Elements - Q
« Reply #1 on: November 16, 2018, 07:46:43 am »
2. Paolo has implemented that and he calls it context diagram (I did something similar but not to the extend Paolo did).

q.

kewldee

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Insert Related Elements - Q
« Reply #2 on: November 16, 2018, 07:51:56 am »
2. Paolo has implemented that and he calls it context diagram (I did something similar but not to the extend Paolo did).

q.

Context Diagram - yes this sounds about right. We are trying to do the same thing. The main object in the middle and all related elements surrounding it. So did you & Paolo actually use a SQL query to somehow generate this diagram ?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Insert Related Elements - Q
« Reply #3 on: November 16, 2018, 09:29:01 am »
I can't really talk about Paolo's solution since it's years ago I did some beta testing. I guess he'll catch up with this when he's back.

I did quite some scripting to create/synch the context diagram. The context diagram is the composite diagram of the element itself. The main element is placed in the center with thick border line. All related elements (according to some tricky algorithm) are arranged around it (separating generalizations, associations, dependencies etc.). SQL is not necessary since there's more or less just Element.Connectors to be iterated. The more tricky part is to arrange the elements on the diagram so it's readable.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Insert Related Elements - Q
« Reply #4 on: November 16, 2018, 10:19:17 am »
1. Insert Related Elements: (accessible via right click on a class): When I use this to insert all related elements, even at Level 1 depth, in addition to adding the related elements to the diagram, EA is automatically adding relationships between the 'related' elements also which is causing a cesspool of connectors on the resulting diagram. We have around 600 classes which is compounding the issue. Is there a way to make EA show only the related elements on the diagram, using this feature, and not all the relationships between the related elements ? Any add - ins that can achieve this ?
To show only the relationships directly to/from your desired element(s):
Open the relationships window.
Select everything on the diagram
(Possibly optional - Type 'Visible' into the filter bar for the last? column)
Right click on any row, and select hide.
Select the elements that you want to see the relationships for.
(Possibly optional - Type 'Hidden' into the filter bar for the last? column)
Right click on any row, and select show.

My apologies if any of that doesn't use exactly the right term. It's from memory.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Insert Related Elements - Q
« Reply #5 on: November 16, 2018, 11:49:12 am »
2. Paolo has implemented that and he calls it context diagram (I did something similar but not to the extend Paolo did).

q.
Hi kewldee,

We have built a C# add-in that creates what we call a "Neighborhood diagram".
For any element, we "hi-jack" the composite diagram and create our own.  The element (we call it the Root Vertex) is presented "in all its glory" (in rectangular mode) with all aspects visible.

We then use the API to locate the elements related to the root vertex.  These related elements are added/removed from the diagram (if the relationships have changed) but in simplified icon form.  If there are any relationships between the non-Root vertices, they are suppressed.  Finally, we use the API to determine which other diagrams (other than Neighborhood diagrams) the root vertex appears in and these are listed as diagram hyperlinks down the left-hand side.

Using this technology, which we run as required, or during our overnight processing; our users are never more than two double-clicks away from anywhere in the repository the root vertex appears in.

This functionality has been under development for nearly a decade and has evolved as we tackle new versions and issues (diagramming embedded elements, handling ProxyConnectors etc. etc.)

While it isn't "rocket science" it IS non-trivial.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Insert Related Elements - Q
« Reply #6 on: November 16, 2018, 06:17:52 pm »
I also once made an EA-Matic script that basically does the same thing, but on the fly.

I called it Self-maintaining diagrams

Geert

kewldee

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Insert Related Elements - Q
« Reply #7 on: November 17, 2018, 04:20:20 am »
1. Insert Related Elements: (accessible via right click on a class): When I use this to insert all related elements, even at Level 1 depth, in addition to adding the related elements to the diagram, EA is automatically adding relationships between the 'related' elements also which is causing a cesspool of connectors on the resulting diagram. We have around 600 classes which is compounding the issue. Is there a way to make EA show only the related elements on the diagram, using this feature, and not all the relationships between the related elements ? Any add - ins that can achieve this ?
To show only the relationships directly to/from your desired element(s):
Open the relationships window.
Select everything on the diagram
(Possibly optional - Type 'Visible' into the filter bar for the last? column)
Right click on any row, and select hide.
Select the elements that you want to see the relationships for.
(Possibly optional - Type 'Hidden' into the filter bar for the last? column)
Right click on any row, and select show.

My apologies if any of that doesn't use exactly the right term. It's from memory.

On the Relationships window, when I right click I do not see Show / Hide option at all. All I see when I multiselect rows is 'Source Feature, Target Features and Place Element(s) in diagram' options. We are using version 13.5.1352. Is that show/hide option available on some other window in 13 or am I missing something ?

I have seen the Show/Hide feature on the 'Links' tab on 'element properties' so I know how this looks like just can't find it on relationship window.

kewldee

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Insert Related Elements - Q
« Reply #8 on: November 17, 2018, 04:28:35 am »
2. Paolo has implemented that and he calls it context diagram (I did something similar but not to the extend Paolo did).

q.
Hi kewldee,

We have built a C# add-in that creates what we call a "Neighborhood diagram".
For any element, we "hi-jack" the composite diagram and create our own.  The element (we call it the Root Vertex) is presented "in all its glory" (in rectangular mode) with all aspects visible.

We then use the API to locate the elements related to the root vertex.  These related elements are added/removed from the diagram (if the relationships have changed) but in simplified icon form.  If there are any relationships between the non-Root vertices, they are suppressed.  Finally, we use the API to determine which other diagrams (other than Neighborhood diagrams) the root vertex appears in and these are listed as diagram hyperlinks down the left-hand side.

Using this technology, which we run as required, or during our overnight processing; our users are never more than two double-clicks away from anywhere in the repository the root vertex appears in.

This functionality has been under development for nearly a decade and has evolved as we tackle new versions and issues (diagramming embedded elements, handling ProxyConnectors etc. etc.)

While it isn't "rocket science" it IS non-trivial.

Paolo

Looks like a lot of work went into your Add in. I don't mean to be condescending but is this Add In available for purchase by any chance or is it not shared ?

kewldee

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Insert Related Elements - Q
« Reply #9 on: November 17, 2018, 04:30:14 am »
I also once made an EA-Matic script that basically does the same thing, but on the fly.

I called it Self-maintaining diagrams

Geert

I got an ok from our team lead to check out the EA-Matic add in. I will install it. Will check with you if I run into issues. Thanks.