Book a Demo

Author Topic: Find Diagrams with Connector  (Read 6978 times)

Gayle

  • EA User
  • **
  • Posts: 37
  • Karma: +1/-0
    • View Profile
Find Diagrams with Connector
« on: January 25, 2017, 06:09:21 am »
I am using EA 13.0.1307 and VB scripts on an eap file.  My model has multiple types of connectors that appear on one or more diagram and can be hidden on other diagrams.  Using VB data extraction, I have discovered about 300 connectors that are hidden in at least one diagram.

I would like to verify that each of my hidden connectors is not hidden on at least one diagram.  My first inclination was to use a technique similar to one I found on the EA forum to locate all of the diagrams that an element appeared in.  That technique relied on the following SQL statement:
  sql = "SELECT Diagram_ID FROM t_diagramobjects WHERE Object_ID = " & Element.ElementID

The XML result could be parsed to get a diagram list for the selected element.

Is there a similar approach that I could use for the connectors? I don't have much knowledge about SQL, but do know that the above statement will not work as-is for connectors.  Since an ElementID and a ConnectorID could be the same number, I can't just use the above SQL statement with the Connector as an Element. 

For each connector I have a lot of information, however, most of the connectors do not have a Name.  The data that I have includes the connector ID, type, direction, source and target information.

Ideas?

Thank you, Gayle

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Find Diagrams with Connector
« Reply #1 on: January 25, 2017, 07:33:40 am »
Start with
Code: [Select]
SELECT * FROM t_diagramlinks WHERE Hidden=True
q.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Find Diagrams with Connector
« Reply #2 on: January 25, 2017, 04:29:49 pm »
There is a helpful book from qwerty - Inside EA - which may help you by this and related tasks.

Kind Regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Eamonn John Casey

  • EA User
  • **
  • Posts: 110
  • Karma: +0/-1
    • View Profile
Re: Find Diagrams with Connector
« Reply #3 on: February 03, 2017, 06:49:03 pm »
Our approach is that if you are using the "hide connector" functionality is that you are modelling at two different levels and so being a bit lazy/sloppy. Try rethinking the question and use the concept of 1:1 between elements. Your problem will go away when you push the compleksitity lower down and use the "1:1 between elements" approach.

Gayle

  • EA User
  • **
  • Posts: 37
  • Karma: +1/-0
    • View Profile
Re: Find Diagrams with Connector
« Reply #4 on: February 09, 2017, 08:07:57 am »
Unfortunately, our system is not as cut-and-dried as that.  We have elements (classes, actors, etc.) that are used in multiple diagrams at the same hierarchical level in the architecture.  Using the DoDAF standard for diagrams creates multiple views that reuse the same elements, but the elements have different relationships in the various views.  For instance, we have an actor and class that in an OV-1 diagram (operational concept) have an information flow relationship and in an OV-2 diagram (Resource Flow Description) have an association relationship.  The OV-1 diagram hides the association and the OV-2 diagram hides the information flow.

I have been able to use my existing tools to extract all interfaces that are hidden into a table and all interfaces that are not hidden in another table.  From there using Excel to post-process the output table, I get two worksheets that can be used to isolate the Connector IDs and remove duplicates.  The remaining list of hidden interfaces can be used to perform VLOOKUP functions on the not hidden worksheet to determine if there are any interfaces that are orphans (hidden in all diagrams).

That is not the approach I would like to end up with, but it is good enough for now.  I was diverted on another task and have not yet been able to try the SQL recommendation.

Gayle