Book a Demo

Author Topic: Using fragments outside document sections?  (Read 4943 times)

Hurra

  • EA User
  • **
  • Posts: 183
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Using fragments outside document sections?
« on: December 19, 2018, 09:42:38 pm »
Hi!

I have a chapter which documents parts of a ResourceArchitecture (UAF) which I built with fragments. In the intro to this section I have created a general, like small metamodel, of how the parts are documented. My idea was to create a document script and use the diagramID as input. It works great, but I can't use the fragment where I want to use it.


Code: [Select]
intro text and heading
package>
element>
sub-heading
text and several fragments

<element
<package

The above works great. Now I would like to add my new fragment to show a specific diagram with the intro text, something like:

Code: [Select]
intro text and heading
Template - my document script fragment
package>
element>
sub-heading
text and several fragments

<element
<package

This ouputs the text of the fragment, with the red background.

I tried to put the fragment between package> and element>, no luck. It works within element> <element, but then I get the diagram for every part, which is not what I'm looking for.

Any pro-tips?

Thanks!

edit:

yay post 100  8) 8)
« Last Edit: December 19, 2018, 09:46:37 pm by Hurra »
always learning!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Using fragments outside document sections?
« Reply #1 on: December 19, 2018, 09:47:54 pm »
Use a virtual document and create a separate model document for your intro section.
You'll have to create a regular template that calls the fragment and assign that to your model document.

Geert

Hurra

  • EA User
  • **
  • Posts: 183
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Re: Using fragments outside document sections?
« Reply #2 on: December 19, 2018, 09:50:01 pm »
Use a virtual document and create a separate model document for your intro section.
You'll have to create a regular template that calls the fragment and assign that to your model document.

Geert

I tried to tidy up the model documents. There were like 50 model documents before, I've been trying to reduce them. But the short answer is no, you can't, create a model document..?
always learning!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Using fragments outside document sections?
« Reply #3 on: December 19, 2018, 09:58:11 pm »
Use a virtual document and create a separate model document for your intro section.
You'll have to create a regular template that calls the fragment and assign that to your model document.

Geert

I tried to tidy up the model documents. There were like 50 model documents before, I've been trying to reduce them. But the short answer is no, you can't, create a model document..?
Yes, I think so.
Instead of trying to reduce the number of model documents we choose to automate the creation of them with a script.
This way it doesn't bother anyone that there are lots of model documents.
This approach makes template development a lot easier; we have lots of small and simple templates that are combined in a virtual document with lots of model documents.

Geert

Hurra

  • EA User
  • **
  • Posts: 183
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Re: Using fragments outside document sections?
« Reply #4 on: December 19, 2018, 10:04:09 pm »
Use a virtual document and create a separate model document for your intro section.
You'll have to create a regular template that calls the fragment and assign that to your model document.

Geert

I tried to tidy up the model documents. There were like 50 model documents before, I've been trying to reduce them. But the short answer is no, you can't, create a model document..?
Yes, I think so.
Instead of trying to reduce the number of model documents we choose to automate the creation of them with a script.
This way it doesn't bother anyone that there are lots of model documents.
This approach makes template development a lot easier; we have lots of small and simple templates that are combined in a virtual document with lots of model documents.

Geert

Roger that, thank you.
always learning!