Book a Demo

Author Topic: Locating linked documents  (Read 7556 times)

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Locating linked documents
« on: May 04, 2016, 11:44:40 am »
A significant issue exists when trying to update the normal.rtf styles to our corporate standard.
Its not enough to simply update all the user templates.
Every linked document requires its styles to be updated as well, otherwise the results are undefined (Word does not handle well multiple redefinitions of a style when it comes to numbering schemes (multi-level lists).


My question is:
Can I use "Find in Project" (<ctrl>-f) to locate all linked documents?


Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Locating linked documents
« Reply #1 on: May 04, 2016, 02:58:14 pm »
Not sure if you can with the standard search builder, but you definitely can with an SQL Search.
IIRC linked documents are stored in t_document. So you would have to join t_object with t_document to get the relevant results.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Locating linked documents
« Reply #2 on: May 04, 2016, 05:00:36 pm »
Here's a snippet you can paste into a SQL search definition.

Code: (SQL) [Select]
select t_object.ea_guid as CLASSGUID, t_object.Object_Type as CLASSTYPE,
t_object.Name, t_document.DocID, t_document.DocDate
from t_document
left join t_object on t_document.ElementID = t_object.ea_guid
where t_document.DocType = 'ModelDocument'

You need to check the document type because baselines are also stored as documents (of type 'Baseline'), and in there may be some other stuff there as well.

A document has a name, but that isn't meaningful because it's not shown anywhere in the GUI (to my knowledge). It's simply the name of the element at the time the document was created (and it's not updated when the element's name changes).

Adding a search term is left as an exercise for the reader. :)

/Uffe
My theories are always correct, just apply them to the right reality.

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Locating linked documents
« Reply #3 on: May 05, 2016, 06:25:26 am »
Code: (SQL) [Select]
select t_object.ea_guid as CLASSGUID, t_object.Object_Type as CLASSTYPE,
t_object.Name, t_document.DocID, t_document.DocDate
from t_document
left join t_object on t_document.ElementID = t_object.ea_guid
where t_document.DocType = 'ModelDocument'
Most helpful thankyou.
And it brings to mind the suggestions to
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.