Summary: this section provides instructions for working with Templates in the Architecture Studio.

Introduction

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)

Available options

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

Available options:

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:

Default display

Four templates will be displayed in two columns - scroll buttons allow you to scroll through the available templates:

Click to enlarge

View All

All templates are displayed in a two column list:

Click to enlarge

1

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.
2

Displays the origin of the Model Template:

ProductTemplate delivered with Console. These templates cannot be edited nor removed.
User-DefinedTemplates created manually from existing Models or imported from a .castarchitect/.castrule file. These templates can be edited and removed.
3

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.

4

Displays the date the template was last modified. For product templates, the date the parent Application was created will be displayed.

5

Use this button to create a new Model using the selected Template. See Create a Model from a template.

6

Options button

View

Use this option to view the Model Template in the editor. The Model editor will be displayed:

Note that Product templates cannot be saved, therefore they cannot be edited.

Remove

Use this option to remove the Template. Product templates cannot be removed therefore the option will not be available.

Download

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: