Metric definition is the attribute of a metric suite with the «MetricDefinition» stereotype applied.
To build a metric definition
- Select the shape of a metric suite.
- Click the Create Element button on the shape, and then select Metric Definition. An attribute with the «MetricDefinition» stereotype is created.

- Type its name directly on the shape and then click a free space on the diagram.
- Select the attribute on the shape and click
. Select the type of the result values that should be calculated according to the formula specified in a metric definition.
Press Enter to open the Specification window of the metric definition.
- Click the cell of the Default Value property value.
and
appear on the cell. - Click
and select Value Specification > Opaque Expression. Click the cell of the Default Value property value again, and then click
. The Default Value dialog opens.
From the Language drop-down list, select a language.
In the Body box, specify the formula for the metric definition. For more information about building structured expressions, see Specifying criteria for querying model.
- Click OK and then click Close in the Specification window.
The metric definition is specified.
One metric definition can refer to another metric definition of either the same metric suite or a more general one (in case there is a generalization relationship between these metric suites).