Author Topic: Document Publishing: Heading Numbering in Custom Script Fragments  (Read 6456 times)

mbabos

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Document Publishing: Heading Numbering in Custom Script Fragments
« on: September 13, 2022, 10:23:30 pm »
Hi everyone,

I am publishing a model as a custom document, where I currently have a main template, that is using a template fragment to output each element. The fragment uses a custom script to gather some data for each element.
My issue is with the numbering of the section headings. It seems as soon as I enable the custom section in the template, the heading level is fixed to the one used in the fragment, when it should be incremented according to the actual position in the output document.
So for example an element XYZ is a child of package "ABC", and in the final document the package is output as "1.2. ABC", I would expect the element heading to be numbered as "1.2.1. XYZ" for example. But it is numbered "1.3. XYZ" for example, so it seems it is always put to the same level as the parent. When I remove the custom section from the fragment and put some standard field as a heading in the element section, the numbering is as expected.
Is this a bug or am I missing something here?

Best regards,
Martin

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13305
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document Publishing: Heading Numbering in Custom Script Fragments
« Reply #1 on: September 13, 2022, 10:55:04 pm »
There are a few things to take into account:

- There is a option in your template properties that deals with the heading numbers, the "Adjust Heading Levels".
I'm not 100% sure how this works exactly (it seems to work in work weird sometimes) but it does have an effect on that.

- Make sure you use exactly the same styles in both all of your templates. Especially the list override has to be the same, or you get weird results.
I usually start from a single (empty) template, that contains all of the correct styles, and copy that to create all of my "real" templates. (I guess that's a meta-template then ;))

Geert

mbabos

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Document Publishing: Heading Numbering in Custom Script Fragments
« Reply #2 on: September 14, 2022, 11:56:20 pm »
Hello Geert,

thanks for your suggestions, much appreciated. I tried to "Adjust Heading Levels" but this seems to limit the maximum heading level only. Also I created all templates as new (it is actually only one master template) and created the fragment  as a copy from the master, but it didn't help much.
It seems that as soon as I use a template fragment with a numbered heading, it is assigned the wrong level. Unfortunately the heading contains data from the custom script used in the fragment, so I need the heading inside the fragment...
Oh well, it seems I'm stuck here. Time to contact support...  :)

Kind regards,
Martin


Jens Nötzold

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Document Publishing: Heading Numbering in Custom Script Fragments
« Reply #3 on: April 10, 2025, 12:18:46 am »
late reply, but I can confirm the issue with EA 16.1.1629 64 bit.
model document with custom script fragment sets heading level to 1 an confuses all subsequent level numbers on following model documents.

Any updates/solutions on this?