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 should create the Templates package in an administrative View of the project file rather than in any work area, to prevent the package from being changed or lost in any project development work


Modifying the appearance of elements

There are two other ways in which you can modify the 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 Language, 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

UML Profiles

UML Stereotypes

How To:

To set up the element Templates package, follow the steps below:




See Also



Create a new package in the appropriate administration View

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



  • 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