Author Topic: Traceability - Find in all diagrams  (Read 1996 times)

Marian N

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Traceability - Find in all diagrams
« on: February 05, 2015, 07:19:48 am »
Hi Guys,

I'd appreciate some help with the following issue I have.
I need to generate a report (preferably Rtf/Docx) regarding the elements usage in diagrams. It should be similar to what one can achieve when an element is selected and the option "Find in all Diagrams" (Ctrl+U) is used.
The report should be run on a whole package and look like this:
Package "A" contains the following elements:
Element 1 is found in:
- Diagram 1
- Diagram 2
Element 2 is found in:
- Diagram 1
- Diagram 3

etc.

All clues are highly appreciated!
Thanks a lot.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11202
  • Karma: +412/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Traceability - Find in all diagrams
« Reply #1 on: February 05, 2015, 06:02:01 pm »
A possible solution would be to use an sql search to get the list of elements and/or diagrams.

Something like this:

Code: [Select]
select distinct d.ea_guid AS CLASSGUID,d.Diagram_Type AS CLASSTYPE,d.name as Name, o.name as elementName,package.name as PackageName ,package_p1.name as PackageLevel1,package_p2.name as PackageLevel2 ,package_p3.name as PackageLevel3
from ((((((t_diagram d
inner join t_diagramobjects do on do.Diagram_ID = d.Diagram_ID)
inner join t_object o on o.Object_ID = do.Object_ID)
inner join t_package package on d.package_id = package.package_id)
left join t_package package_p1 on package_p1.package_id = package.parent_id)
left join t_package package_p2 on package_p2.package_id = package_p1.parent_id)
left join t_package package_p3 on package_p3.package_id = package_p2.parent_id)
where o.package_id = #Package#

Geert

Marian N

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Traceability - Find in all diagrams
« Reply #2 on: February 05, 2015, 07:49:36 pm »
Thanks a lot, that will do.
 :)