Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: MatthiasRue on January 19, 2024, 06:41:00 pm

Title: RTF Template behaves different between v12 and v16
Post by: MatthiasRue on January 19, 2024, 06:41:00 pm
We recently ported an old .eap-File from v12 to a qeax-File for v16. The modell contains sereval RTF-Documentation-Template which worked in the past.
With v16 the generation of the heading numbers behave different.

The template looks like this:
--------------------------------

package >
{Pkg.Name}

diagram >
{Diagram.Type} Diagram "{Diagram.Name}"
{Diagram.Notes}
{Diagram.DiagramImg}
Figure {Diagram.Figure}: {Diagram.Name}
element >
< element
< diagram
child packages > 
< child packages
element >
embedded elements >
< embedded elements
diagram >
< diagram
child elements >
< child elements
< element
< package

--------------------------------

The templates works on package structure like this

Code: [Select]
package1
|_elements
|_package2
|    |_elements
|_package3
     |_elements

In v12 the template produces an output like this:

1.1 Name Package1
1.1.2 Name Package 2
1.1.3 Name Package 3

In v16 the same template produces an output like this:

1.1 Name Packag1
1.2 Name Packag2
1.3 Name Packag3

Has anybody an idea what went wrong and how to correct the generation of numbering of the headings in v16?

Thanks
Matthias



Title: Re: RTF Template behaves different between v12 and v16
Post by: Geert Bellekens on January 19, 2024, 06:54:56 pm
Yeah, I'm still waiting on a fix for that (must be more than a year now)

In v16 they messed up the docgen, especially the structure of the document.

Most of my clients are still on v15.2 because of this regression.

Geert
Title: Re: RTF Template behaves different between v12 and v16
Post by: MatthiasRue on January 19, 2024, 07:07:50 pm
Thanks for the response.
Than we try v15.2.

Best regards
Matthias
Title: Re: RTF Template behaves different between v12 and v16
Post by: Jan van Duuren on January 25, 2024, 12:25:34 am
We have solved this problem with scripting, by reopening the generated (word/rtf) document with Word in the background (ActiveXObject or COMObject). Then we update whatever we want in the document, such as heading levels, insert footers, update the Table of Content etc. It gives you full control over the formatting of the generated document.
Basically all our document generation is done by scripts with the "CreateDocumentGenerator()" API.
It works also with EA 16 without any problems.

I could create an example script, if you are intersted.
Title: Re: RTF Template behaves different between v12 and v16
Post by: Geert Bellekens on January 25, 2024, 01:00:10 am
We have solved this problem with scripting, by reopening the generated (word/rtf) document with Word in the background (ActiveXObject or COMObject). Then we update whatever we want in the document, such as heading levels, insert footers, update the Table of Content etc. It gives you full control over the formatting of the generated document.
Basically all our document generation is done by scripts with the "CreateDocumentGenerator()" API.
It works also with EA 16 without any problems.

I could create an example script, if you are intersted.
Isn't that sad, that we have to resort to such measures to counter the regression bugs from Sparx? >:(

Geert
Title: Re: RTF Template behaves different between v12 and v16
Post by: wivel on January 25, 2024, 01:20:23 am
We have solved this problem with scripting, by reopening the generated (word/rtf) document with Word in the background (ActiveXObject or COMObject). Then we update whatever we want in the document, such as heading levels, insert footers, update the Table of Content etc. It gives you full control over the formatting of the generated document.
Basically all our document generation is done by scripts with the "CreateDocumentGenerator()" API.
It works also with EA 16 without any problems.

I could create an example script, if you are intersted.
Glad you got it working, but it shouldn't be necessary to resort to measures like that. Sparx - Go FIX!. This issue is one of the main reasons I have recommended my clients to stay at 15.2

Henrik
Title: Re: RTF Template behaves different between v12 and v16
Post by: PeterHeintz on January 25, 2024, 06:27:41 pm
Yes, I am waiting for that fix really a long time as well.
Title: Re: RTF Template behaves different between v12 and v16
Post by: Geert Bellekens on January 25, 2024, 08:10:54 pm
I've sent a reminder to Sparx support referencing this topic.

Hopefully that has some effect.

Geert