Book a Demo

Author Topic: Include linked document from ancestor's RefGUID tag  (Read 5083 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Include linked document from ancestor's RefGUID tag
« on: May 01, 2016, 02:26:03 am »
Hi all,


This one's got me stumped. I was hoping the new Document Script fragments might help, but... well, see my other post.

I've got a generalization hierarchy. No multiple inheritance.
The root element in this hierarchy has a RefGUID tagged value named "doc". Some of the descendants override this, some do not.
The reference elements have all got linked documents.

When I document any element in this hierarchy, I want to include the linked document from the element referenced in the nearest ancestor's "doc" tag.

I could do this easily if I wrote a document generation script, but I want to do it using just templates. Fragments are fine, but I want to be able to invoke the document generation process the regular F8 way, not by running a script.

How the hell am I meant to do that?

Cheers,


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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Include linked document from ancestor's RefGUID tag
« Reply #1 on: May 01, 2016, 05:06:34 pm »
I think you have two choices.

Either you write a document script fragment in which you search up the inheritance tree for the doc tag you need. In that script you then can simply return the linked document itself since these fragments are supposed to return raw RTF.

Or you use a model document in the virtual document that (using a search) points to the element you need.
If you automate the creation of the virtual document like I do then that is reasonable solution. If you need to do that manually that might be a bit too much effort.

Geert


Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Include linked document from ancestor's RefGUID tag
« Reply #2 on: May 04, 2016, 02:44:26 pm »
Thanks for your help, Geert. I've got the Document Script fragments to work now and with them this'll be easy-peasy. :)

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