Book a Demo

Author Topic: How do you export the relationship list  (Read 5545 times)

deanwarren

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
How do you export the relationship list
« on: April 07, 2010, 10:48:19 pm »
How do you export the relationship list?

I understand you can click on a component an open the relationships windows to view all of it's relationships. In the model I have this shows lots of relationships, some of which are requirements.

I need to export the list of requirements including their 'status', 'author' and 'short description'.

I have tried using the RTF export, but keep ending up with a blank document.

Please can someone advise on how to configure the RTF to do this and or any other method available?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How do you export the relationship list
« Reply #1 on: April 07, 2010, 10:59:59 pm »
I would create an SQL custom search.
From the search results you can either run an RTF report, or just copy/paste the contents in Excel or something.

Geert

deanwarren

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: How do you export the relationship list
« Reply #2 on: April 07, 2010, 11:23:01 pm »
Umm, how to I create an SQL custom search in EA?  :-/
« Last Edit: April 07, 2010, 11:23:23 pm by deanwarren »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How do you export the relationship list
« Reply #3 on: April 07, 2010, 11:49:16 pm »
There are a few custom sql searches available on the community site that you can download and import.
(go to Ctrl-F + manage searches)

Geert

deanwarren

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: How do you export the relationship list
« Reply #4 on: April 08, 2010, 01:46:39 am »
Thnaks I managed to get some SQL queries working.

How ever I need to know the relationships between various EA parts to no how to form the query.

For example: I have a package that contains sysml requirements diagrams and these diagrasm contains requirements from other packages elsewhere.

So I know I can find all requirements like this

SELECT *
FROM t_object
WHERE object_type='Requirement'

But how do I query for requirements that appear in diagrasm of a differnt package?

I tried this

SELECT t_object.Alias, t_package.Package_ID FROM t_object, t_package WHERE t_object.Alias='Requirement' AND t_package.Package_ID='MyPackageName'

but this doesn't work because the requirements are not in  this package, they are just 'related' to this package via the diagrams. But how is this stored? How do I create a query to resolve this?  :'(

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How do you export the relationship list
« Reply #5 on: April 08, 2010, 09:13:21 am »
Each element (t_object) will have zero or more related diagram objects (t_diagramobjects.Object_ID = t_object.Object_ID). The diagram object will have a related diagram (t_diagram.Diagram_ID = t_diagramobjects.Diagram_ID) and the diagram will have an owning package (t_diagram.Package_ID). You may want to check that t_diagram.ParentID=0... if it's non-zero it means the diagram is owned by an element that is (directly or indirectly) owned by the package.
The Sparx Team
[email protected]

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How do you export the relationship list
« Reply #6 on: April 08, 2010, 04:15:32 pm »
Dean,

If you are writing custom SQL searches, don't forget to select CLASSGUID and CLASSTYPE. EA uses those two columns to set the correct icon, and allow to select the item in the project browser.

I think following search should get you started:
Code: [Select]
select o.ea_guid as CLASSGUID,o.Object_Type as CLASSTYPE,o.name as Name,
package.name as 'Package Name' ,package_p1.name as 'Package level -1',package_p2.name as 'Package level -2',package_p3.name as 'Package level -3'
from ((((((t_diagram d
inner join t_diagramObjects do on d.diagram_id = do.diagram_id)
inner join t_object o on do.object_id = o.object_id)
inner join t_package package on o.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.object_type = 'Requirement'
and package.name like '<Search Term>'
You have to enter the package name in the search box to get the results

Geert

deanwarren

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: How do you export the relationship list
« Reply #7 on: April 08, 2010, 04:29:02 pm »
Wow! Thanks for this - I will give this a try today.  :)