Use Element Templates

Return to Introduction  Previous page  Next page

To control the appearance of elements, you can set a default element template. This functionality could be used, for example, to denote different stages of a project. A template with different color fill could be created for each stage, so that elements added in each stage are instantly identifiable as belonging to that stage. Element templates do not support the definition of stereotypes within the template. This means that when a stereotype is selected the stereotype settings cause the template to revert to the default setting.

To configure the default element template, follow the steps below:

1.First create a new package; this could be named Templates, for example.
2.Within the Templates package create new diagrams, one for each type of diagram to template. Name them so that they are easy to recognize; for example ClassTemplate for the template for Class diagrams.
3.Add new elements to the template diagrams from the Enterprise Architect UML Toolbox and configure the size, appearance, notes, version and other properties.
4.Select the Settings | Template Package menu option to set the templates as the default element templates. The Browse Project window displays.
5.Locate and click on the Templates package, and click on the OK button to set the Templates package as the default element template.

Now each new element you add to your project is created with the settings in the template diagrams. When you create elements, Enterprise Architect checks the templates directory first and if a template is found, copies the settings from there.

Note: If you decide not to use the default element template, set the default element template to <none> in the Browse Project window.

You can also change the appearance of elements (and other structures) by using UML Profiles. These provide a means of extending the UML Language, which enables you to build UML models in particular domains. They are based on additional stereotypes and Tagged Values that are applied to elements, attributes, methods, links, link ends and so on. For more information, see UML Profiles.