Author Topic: Creating a simple document generation template  (Read 1881 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Creating a simple document generation template
« on: May 02, 2024, 08:45:25 pm »
This is not the 1st time I post about this, I am trying to create a simple document generation template without re-using the out-of-the-box Model Report which uses a/the Template selector. It seems that I have either forgotten how to do this, the functionality has changed or is broken, I am using 16.1.1628, and I am aware of the problem Geert reported and wrote about extensively when v16 was released.

I have a structure as follows:
Package 1
---Diagram 1
-----Package 1a
----------Diagram 1a
----------Element 1
----------Element 2
----------Element n
-----Package 2a
----------Diagram 2a
----------Element 10
----------Element 11
----------Element 1n

All I want is a document with the following sections and content:

Package 1 + Name [Section]
Package 1 Notes [Content]
Diagram 1 Image [Content]
Diagram 1 Notes [Content]

Package 1a + Name  [Section]
Package 1a Notes [Content]
Diagram 1a Image [Content]
Diagram 1a Notes [Content]

Element 1 Alias + Name + Notes
Element 2 Alias + Name + Notes
Element n Alias + Name + Notes


Package 2a + Name  [Section]
Package 2a Notes [Content]
Diagram 2a Image [Content]
Diagram 2a Notes [Content]

Element 10 Alias + Name + Notes
Element 11 Alias + Name + Notes
Element 1n Alias + Name + Notes


I cannot find a way of getting the items in red in the document no matter what I do. I am not even sure if the items in orange will appear. A template selector does it, but it is not my preferred approach, both a fragment (with SQL) or a script will do it but it will take to long.

What am I missing?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Creating a simple document generation template
« Reply #1 on: May 02, 2024, 09:11:43 pm »
Hi Modesto,
How did you get the package nested under the diagram? I am assuming every 3 dashes indicates a level.  I thought you could only nest packages under packages.
There is no context menu to nest a package (or element) under a diagram.


HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Re: Creating a simple document generation template
« Reply #2 on: May 02, 2024, 09:26:58 pm »
Hi Paolo, that was a typo resulting from my slight irritation with Sparx a several other converging irritants, my apologies.

The structure looks like:
Package 1
---Diagram 1
---Package 1a
----------Diagram 1a
----------Element 1
----------Element 2
----------Element n
---Package 2a
----------Diagram 2a
----------Element 10
----------Element 11
----------Element 1n

Package 1 is a view sitting directly under the root.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Creating a simple document generation template
« Reply #3 on: May 02, 2024, 09:49:19 pm »
I'm not sure why this would be so hard.

It should simply be

Code: [Select]
package>
diagram>
-- here the diagram stuff--
<diagram
element>
--here the element stuff--
<element
child packages>
<child packages
<package

And make sure you don't have any filters activated, and don't exclude any diagrams from the documentation.

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Re: Creating a simple document generation template
« Reply #4 on: May 02, 2024, 10:14:15 pm »
Thanks Geert, I will try it again but that does not seem to be working. Of course, I could have made a silly mistake but cannot see it.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Re: Creating a simple document generation template
« Reply #5 on: May 03, 2024, 02:29:16 am »
Just an update on this, I had

Code: [Select]
package>
diagram>
-- here the diagram stuff--
element>
-- some element stuff (other than the one below)--
<element
<diagram
element>
--here the element stuff--
<element
child packages>
<child packages
<package

As soon as, I removed that it started generating the right content.