Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Mauricio Moya (Arquesoft) on May 28, 2019, 12:53:52 am

Title: How to include the name of an element in a template header?
Post by: Mauricio Moya (Arquesoft) on May 28, 2019, 12:53:52 am
I have a document template in which I need the header includes the name of the selected element (the element where I press F8 and then select the template in order to get the document).

As you know, when you select the checkboxes in the left part of the template editor, the yellow markers are included in the body of the template but not in the header nor footer.

Is there a way to include the element name (or the yellow marker) in the template header? Or: how do I include the element name in the header of all the pages of a document template?
Title: Re: How to include the name of an element in a template header?
Post by: Geert Bellekens on May 28, 2019, 05:44:53 am
I don't think you can.

Alternative might be to use model documents. There are a number of tagged values such as ReportName, Alias, status etc.. that you can use on things like the cover page and the header and footer.

Geert
Title: Re: How to include the name of an element in a template header?
Post by: Mauricio Moya (Arquesoft) on May 28, 2019, 06:08:35 am
But, how do you set these values for the selected element? Is there any mechanism to set the model document "parameters" automatically? for example, within a fragment script?
Title: Re: How to include the name of an element in a template header?
Post by: Geert Bellekens on May 28, 2019, 01:24:52 pm
You can create a virtual document with a model document that points to exactly one element with search.
I use one that searches on guid, and I pass the guid as search parameter.

Geert