Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Set Element Templates Package




See also


In building up a model, you might want to represent or emphasize certain characteristics of elements in the appearance of those elements, or select particular display options as standard.

For example, you could make new Interface elements a different default color to new Class elements, ensure all new Activity Partitions are vertical rather than horizontal, or set a specific group of display options for new diagrams; you could also define a set of characteristics to use for each development stage of a project.

To do all this, you create a diagram with all the characteristics you require, and store the diagram in an element Templates package; Enterprise Architect then checks this package:

Whenever you start to create an element in a diagram or
Whenever you create a new diagram


If it finds a template for that diagram type, Enterprise Architect applies the settings in that template to the new element or to the display options of the diagram. For example, you could save a diagram under the name ClassTemplate, to apply a set of display characteristics to all new Class elements and all new Class or Logical diagrams.

You can create the Templates package anywhere in your model; however, it is better to create it in a location that is not likely to be accidentally changed or lost in any project development work.



Modifying the appearance of elements

There are two other ways in which you can modify the standard appearance of elements in diagrams:

You can define the default appearance of elements (and other structures) grouped in a diagram by using UML Profiles; these provide a means of extending the UML, which enables you to build UML models in particular domains
Profiles are based on additional stereotypes and Tagged Values that are applied to elements, attributes, methods, connectors and connector ends
You can modify the appearance of elements (and connectors) of a specific type using stereotypes, which take precedence over templates; if you drop an unstereotyped element - a Class, for example - onto a diagram, Enterprise Architect searches the Templates package for a Class diagram that defines an unstereotyped Class, and applies that definition to the new Class
If you drop a stereotyped Class onto a diagram, the stereotype defines the Class appearance so the template is not accessed; stereotypes are much more flexible for defining the appearance of an element under different scenarios



Using UML Profiles





UML Stereotypes


Set up the element Templates package




See also



Create a new package. You can give this package any name; Templates is an unambiguous option.




Within the Templates package create new diagrams, one for each type of diagram to template.

Give them easily recognized names; for example ClassTemplate for the template for Class diagrams.




Add new elements to the template diagrams from the Toolbox, and configure the size, appearance, notes, version and other properties.




Select the Settings | Project Template Package menu option to set the templates as the default element templates.

The Browse Project window displays.




Locate and click on the Templates package, and click on the OK button to set the package as the default element template.

Now each new element or diagram you add to your project is created with the settings from the appropriate Template diagram.




The Fill color for a type of element defined in the element template can be overridden by the element fill color defined from the Format Toolbar, a Shape Script applied to the element, or the Default Appearance dialog
In the Corporate, Business and Software Engineering, System Engineering and Ultimate editions of Enterprise Architect, if security is enabled you must have Manage Reference Data - Update permission to set up or access the element Templates package
If you decide not to use the default element template, set the default element template to <none> in the Browse Project window; the <none> package is at the bottom of the hierarchy shown in the Browse Project window

Learn more