Book a Demo
Prev Next

Incorporate Model Wizard Templates

When a user creates a model within their project, they can choose the type of model to develop from a range of system-supplied model templates presented through the Start Page 'Create from Pattern' tab (Model Wizard). You can also develop custom model templates and add them to this list via your MDG Technology.


You edit the .mts file directly, using whatever file browser you work with to locate and open the file.

Add Custom Model Wizard Templates to MDG Technology



See also


Create a Package that contains all sub-Packages, diagrams, elements, notes and information links that you want to provide in your model template.

See the EAExample.eap model for illustrations of what you might include, or create a model from a standard template and see what is generated.

As a model template, the Package needs to be self contained and not contain any dependencies or other links to elements outside the Package.

Model Wizard


Export your Package to XML.

If you want your template to have supporting documentation displayed in the right-hand panel of the Model Wizard, create a .rtf file containing this documentation in the same directory location as the XML file. The .rtf file must also have the same filename as the XML file. It is recommended that you create the .rtf file within a Document Artifact element in the model, and then export the file (the 'Document-Edit > File > Save as (Export to File)' ribbon option) to the location of the Pattern XML file. This keeps the documentation within your development model.

Export to XMI


To allow multiple custom categories per technology: open your .mts file in a text editor and add two additional attributes to the <Technology> element:

  • categoryList, which contains either a comma-separated list of custom category names, or the name of a single built-in category (such as 'Business')
  • categoryMappings, which contains a list of option pairs of the form 'Group Name 1=Category Name A;Group Name 2=Category Name B;" and so on; the category names must all be in 'categoryList'


Create a reference to the XML file in the .mts file; open your .mts file in a text editor and copy and paste this <ModelTemplates> element at the top level inside the <MDG.Selections> block:


     <Model name="Template Name"



          icon = "34"



You can include as many <Model> elements within the <ModelTemplates> element in your .mts file, one row for each model template.

The attributes within a <Model> element have these meanings:

  • name: The name of the model template to show in the Start Page 'Create from Pattern' tab (Model Wizard), which displays when you create a new model or when you execute the 'Add a Model using Wizard' menu option
  • location: The path of the XML file that contains the export of the model template Package, relative to the location of the ModelPatterns directory in the Enterprise Architect install path:
         -  If the XML file is directly in the ModelPatterns directory then the
               path just contains the file name (for example, MyPattern1.xml)
         -  The XML can be in the same folder as the MDG Technology XML file, with the RTF file in the same folder
         -  If you have placed all your files in a subdirectory of ModelPatterns,
               the path includes the directory name (for example, MyTechnology\MyPattern2.xml)
         -  You can also specify a fixed path (for example, C:\Program Files\MyTechnology\MyPattern3.xml)
  • icon: Contains an index to Enterprise Architect's base icons list; to show the appropriate view icon, use one of these values:
         -  29 = Use Case
         -  30 = Dynamic
         -  31 = Class
         -  32 = Component
         -  33 = Deployment
         -  34 = Simple
  • isFramework: Defines the possible uses of a model Pattern; there are three possible values:
         -  isFramework="true" - never strip GUIDs; the Pattern is intended
            as a re-usable Package for any model
         -  isFramework="optional" - prompt to strip GUIDs; the Pattern is
            intended as a re-usable Package, but the user can choose
         -  isFramework="false" - always strip GUIDs (the default, if not
            stated); the Pattern could be applied multiple times within the
            one model
  • groupName: If multiple custom categories are specified this attribute is used to reference which category this pattern belongs to.
Working with MTS Files


Regenerate the MDG Technology using the edited MTS file.

Learn more