Author Topic: Where are the linked documents?  (Read 949 times)

AndyJ

  • EA User
  • **
  • Posts: 332
  • Karma: +5/-2
  • It's only a model
    • View Profile
Where are the linked documents?
« on: February 08, 2012, 11:59:50 am »
Hi people,

my team has added a number of rtf documents to classes...

We can find them from the context menus associated with a particular class, but no where else.

Is there a method to show all of the documents that have been linked to the project?

Andy.
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8204
  • Karma: +193/-23
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Where are the linked documents?
« Reply #1 on: February 08, 2012, 05:19:32 pm »
Andy,

You could use an sql search for that. Try this:
Code: [Select]
select c.ea_guid as CLASSGUID,c.object_type as CLASSTYPE,c.name as Name, c.stereotype as Stereotype
,package.name as PackageName ,package_p1.name as PackageLevel1,package_p2.name as PackageLevel2
,package_p3.name as PackageLevel3
from (((((t_object c
inner join t_document as d on d.ElementID like c.ea_guid)
inner 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.ElementType = 'ModelDocument'
and c.name like '#WC#<Search Term>#WC#'

Geert

AndyJ

  • EA User
  • **
  • Posts: 332
  • Karma: +5/-2
  • It's only a model
    • View Profile
Re: Where are the linked documents?
« Reply #2 on: February 09, 2012, 08:03:59 am »
Thanks Geert, much appreciated.

That works very nicely.

By searching for * I get a nice list of all objects in the project which have a linked document.

The context menu from the results allows me to edit those linked documents.

Very neat.

Andy
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."