Summary: this section provides instructions for working with Templates in the Architecture Studio.
Model Templates are in essence Architecture/Quality Rule models that can be used as a basis for building new models - i.e. they can facilitate the creation of new Architecture Models or new Quality Rule models:
- Some templates are supplied with Console (Product templates)
- Templates can be created manually from existing models or templates (User Defined templates)
The Templates section is hidden by default. Click the Show Templates button in the Architecture Studio to display it:
When the section is displayed all Templates (product and user-defined) are displayed:
Click to enlarge
|Use this to search for a specific template. Search will be performed on the title of the template.|
Use this button to upload a model created with the end-user application CAST Architecture Checker (i.e. a .castarchitect or .castrule file). Note that the Metric ID assigned to the model in the template must be set to 0 otherwise an error will be displayed when you attempt to upload the file:
Use this button to display all Templates instead of using the default scroll mechanism:
Four templates will be displayed in two columns - scroll buttons allow you to scroll through the available templates:
Click to enlarge
All templates are displayed in a two column list:
Click to enlarge
Name of the Model Template:
- for user defined templates, the name is determined when the Model is created, but can be changed if required.
- for product templates, the name will be pre-defined and cannot be changed.
Displays the origin of the Model Template:
|Product||Template delivered with Console. These templates cannot be edited nor removed.|
|User-Defined||Templates created manually from existing Models or imported from a .castarchitect/.castrule file. These templates can be edited and removed.|
Equivalent file name:
- for user-defined templates, the file name will be pre-defined and take the form "<Name>.CASTArchitect" or "<Name>.CASTRule"
- for product templates, the file name will automatically take the form "<Name>.CASTArchitect" or "<Name>.CASTRule"
File names cannot be changed.
Displays the date the template was last modified. For product templates, the date the parent Application was created will be displayed.
Use this button to create a new Model using the selected Template. See Create a Model from a template.
Use this option to view the Model Template in the editor. The Model editor will be displayed:
Use this option to remove the Template. Product templates cannot be removed therefore the option will not be available.
Use this option to download the template to an .castarchitect or .castrule file (this file can then be loaded in CAST Architecture Checker).
Create a User-Defined template from a Model
Note that when editing the properties of a user-defined Template, it is not possible to set the metric ID value (it will be read only). When a Model is subsequently created from the template, the Metric ID will become editable.
View an existing Model, or create a new one, then use the Save Template button in the Model editor. Then choose Template:
The Model will be saved as a user-defined template. You will be prompted to name the template:
Create a Model from a template
Use this button to create a new Model using the selected Template and then using the Model editor:
Choose the Name for the new model, then click OK to start the editing process - see Model editor for more information: