Book a Demo

Author Topic: Document Generation - how to get elements on a diagram to nest  (Read 18968 times)

andrew.francis

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Document Generation - how to get elements on a diagram to nest
« on: December 17, 2025, 12:12:59 am »
I am generating a virtual document using 'Model Documents' and custom templates, and I want the diagram elements in the published document to be nested in the same way as they are in the Project Browser, but they just export as a flat list. Is there a way to get the generated document to follow the package browsers structure?

I could drop the package containing the elements onto a separate Model Document, but this would mean lots of model documents and lots of templates...

The elements are of the same type, so I don't think I could apply a filter, and again this would need another template.

Thanks in advance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13506
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document Generation - how to get elements on a diagram to nest
« Reply #1 on: December 17, 2025, 01:09:40 am »
You either work with the child-packages/child-elements in your template, or you define the structure yourself using Model Documents.

In some cases I have created multiple copies of the same template, but with a different heading level.
A bit annoying, but only a one-time effort.

Geert

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1350
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Document Generation - how to get elements on a diagram to nest
« Reply #2 on: December 20, 2025, 10:37:50 am »
Unfortunately if you are generating text within the diagram it will come out flat.
If I want to create a diagram followed by headers and text that is hierarchical I'll create two templates. One for the diagram and another for the text that describes each element. I'll usually have three items in my virtual document. An artifact that contains introduction, model document for diagram template and model document for descriptions.
I did discover that you can create and artifact and within that you can drag and drop diagrams and packages using templates. You can then just go in and do an update later to re-generate. It does reduce the number of model documents but not the templates.
Happy to help
:)