Incorporate Model Templates in a Technology
Enterprise Architect has a number of Model Templates that can be added into a model, either on creation of the model, or at any time by right-clicking a package in the Project Browser and selecting the Add | Add Model using Wizard... context menu option. You can create your own templates and include them in your MDG Technology. The first step is to create a template package and save it to an XMI file.
Open your technology file in a text editor and copy and paste the following <ModelTemplates> block at the top level inside the <MDG.Technology> block:
<Model name="Template Name"
description="This is the description."
icon = "34"
filter= "Filter Name"/>
You can include as many <Model/> blocks as you have model templates. The attributes have the following meanings:
|·||name: The name of the model template as shown in the Select model(s) dialog, which displays when you create a new model or when you execute the Add Model using Wizard menu option.|
|·||description: The text that is displayed in the Select model(s) dialog when the name is selected.|
|·||location: Contains either the full name and path of the XML file that contains the XMI export of the model template package, or a file path or URL relative to the location of the MDG Technology file.|
|·||default: Contains either "yes" indicating that the model template is checked by default, or "no" indicating that the model template is un-checked by default.|
|·||icon: Contains an index to Enterprise Architect's base icons list. To show the appropriate view icon, use one of the following values: 29 = Use Case, 30 = Dynamic; 31 = Class; 32 = Component; 33 = Deployment; 34 = Simple.|
|·||filter: If you have a large number of model templates, you can group them on the "Select model(s)" dialog by giving all the model templates in the same group the same filter name. The filter name given appears in the "Select from:" list box in the "Select model(s)" dialog.|
In Enterprise Architect releases up to and including 7.0, it is not possible to persist these settings by editing the .MTS file (in the way that it is possible with Toolbox profiles and Diagram profiles). You must copy and paste your <ModelTemplates> block into your technology file every time you rebuild the technology.