Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Jozzi on April 12, 2023, 03:47:29 am

Title: Document Generation: Order by Z-Order (in templates, not fragments)
Post by: Jozzi on April 12, 2023, 03:47:29 am
Hello, is there a possibility to sort the elements in the template according to Z-order on the diagram?

I have a template for use cases (without fragments). Everything works fine. But I would like to sort the UCs according to Z-order. Do you have any idea? It'll be a game-changer for me

Thank you. Jozzi
Title: Re: Document Generation: Order by Z-Order (in templates, not fragments)
Post by: PeteC on April 13, 2023, 08:02:12 pm
As far as I know, elements are presented in the order they are in the project browser. One option could be to write a script that will sort the elements into their z-order within the project browser and then to generate the document (assuming that you don't want some other specific order in the project browser that cannot be scripted to reverse the z-order sort). I've used that method to sort elements into Alias order prior to generating the document.
Title: Re: Document Generation: Order by Z-Order (in templates, not fragments)
Post by: Geert Bellekens on April 17, 2023, 02:52:28 pm
The way I do stuff like that is to generate a virtual document using a script.

More details: https://bellekens.com/2015/11/12/tutorial-generate-complex-documents-from-enterprise-architect-with-a-two-step-semi-automated-approach/ (https://bellekens.com/2015/11/12/tutorial-generate-complex-documents-from-enterprise-architect-with-a-two-step-semi-automated-approach/)

Geert