Is there a way to search for elements that have corresponding composite diagrams in Enterprise Architect?

StackOverflow https://stackoverflow.com/questions/19389466

  •  30-06-2022
  •  | 
  •  

Question

A number of elements in a given project have composite diagrams.Is there a way I can run a search or query to find these?

Was it helpful?

Solution

An element may contain any number of diagrams, but only one of them can be the composite diagram.

In fact, you can move the composite diagram out of the element and place it somewhere else - it will still be the composite diagram. Don't do this, it really messes up your model. I'm only mentioning it for completeness.

The t_object table has a magic column NType, whose interpretation depends on the element type. "Compositeness" is represented by the number 8 in this column. This is not documented, but not likely to change.

So a query to find all composite elements might look like

select ea_guid as CLASSGUID, Object_Type as CLASSTYPE, Name
from t_object where NType=8

ea_guid as CLASSGUID is the trick that allows you to right-click the search result and look it up in the browser (or in diagrams), Object_Type as CLASSTYPE presents the correct icon for each result. Not necessary, but looks nice.

And of course you can add other columns such as Object_Type (which would show the type as a string), Stereotype, etc.

OTHER TIPS

If you want to find the diagrams for any given element, right-click on the element and select "find in all diagrams" (or ctrl-U). If you want to see the relationships to all other elements in your model starting with all, or a selected in the diagram, open the traceability pane (View > Traceability or ctrl-shift-4) and you will get a dynamic listing of all related elements in an overview.

This also works if you search for the element, and then ctrl-u to the diagram, and then drill down on each element in the diagram with the traceability pane.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top