Prev | Next |
Incorporate Model Builder 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 'Model Builder' dialog. You can also develop custom model templates and add them to this list via your MDG Technology.
Access
You edit the .mts file directly, using whatever file browser you work with to locate and open the file.
Add Custom Model Builder Templates to MDG Technology
Step |
Action |
See also |
---|---|---|
1 |
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 |
2 |
Export your Package to XML. If you want your template to have supporting documentation displayed in the right-hand panel of the Model Builder dialog, 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 |
3 |
To allow multiple custom categories per technology: open your .mts file in a text editor and add two additional attributes to the <Technology> element:
|
|
4 |
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: <ModelTemplates> <Model name="Template Name" location="MyTemplatePackage.xml" default="yes" icon = "34" isFramework="false"/> </ModelTemplates> 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:
|
Working with MTS Files |
5 |
Regenerate the MDG Technology using the edited MTS file. |