Book a Demo

Author Topic: How to find a Linked Document?  (Read 3269 times)

schurms

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
How to find a Linked Document?
« on: August 04, 2009, 01:56:01 pm »
I am looking at using linked documents to store information associated with a specific element.

If I simply have a copy of the printed linked document, is there someway within EA that I can search the project to find the package and/or element that linked document is attached to.  (e.g so that I can update the linked document.)

It seems that linked documents are somehow embedded within and element and do not appear as elements in their own right.  

My current approach is to ensure I have a naming convention on the document which corresponds to the naming convention on the element.  That way I simply search for the element - using the naming convention on the linked document.

Is there a better way?

Cheers... Sean

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: How to find a Linked Document?
« Reply #1 on: August 04, 2009, 02:56:57 pm »
If you want to add a link to document to the element you can just look for the document as you stated.
If you want to create a document element (atrifact) to document the elemtn you can just put it hirarchicaly under it or use links to lo link it to the the element and then search for the elements and look for the documentation in the links.
If you want to search fro content in the linked document you will need to create an add-in search - create an add-in doing the search and called from the search dialog.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

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 to find a Linked Document?
« Reply #2 on: August 05, 2009, 04:43:21 pm »
You can use the SQL search to find all elements that have a linked document (with a specific name)
This query performs does so. (works on SQL server but will probably have to be adjusted for EAP file to match Access syntax)

Code: [Select]
select c.ea_guid as CLASSGUID,c.object_type as CLASSTYPE,c.name as Name, c.stereotype as Stereotype
,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_object c
join t_document as d on (c.ea_guid = d.elementID)
join t_package as package on (c.package_id = package.package_id)
left join t_package as package_p1 on (package_p1.package_id = package.parent_id)
left join t_package as package_p2 on (package_p2.package_id = package_p1.parent_id)
left join t_package as package_p3 on (package_p3.package_id = package_p2.parent_id)
where
d.docname like '<Search Term>'

Geert

schurms

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: How to find a Linked Document?
« Reply #3 on: August 06, 2009, 07:22:24 am »
All many thanks for the solutions.   Have implemented it and it is working great, as we have SQL server.

Cheers... Sean