Page tree

MagicDraw 19.0 LTR SP2 Documentation


Metric definition is the attribute of a Metric Suite with the «MetricDefinition» stereotype applied.


To build a metric definition


  1. Select the shape of a Metric Suite.
  2. Click the Create Element button on the shape, and then select Metric Definition. An attribute with the «MetricDefinition» stereotype is created.



  3. Type its name directly on the shape and then click a free space on the diagram.
  4. Select the attribute on the shape and click .
  5. Select the type of the result values that should be calculated according to the formula specified in a metric definition.

    This step is mandatory. A metric definition must have a result type, e.g., Real or Integer.

  6. Press Enter to open the Specification window of the metric definition.

  7. Click the cell of the Default Value property value.  and  appear on the cell.
  8. Click  and select Value Specification > Opaque Expression.
  9. Click the cell of the Default Value property value again, and then click . The Default Value dialog opens.

  10. From the Language drop-down list, select a language.

    To build a structured expression, select StructuredExpression.

  11. In the Body box, specify the formula for the metric definition. For more information about building structured expressions, see Specifying criteria for querying model.

  12. Click OK and then click Close in the Specification window.


The metric definition is specified.

If your Metric Suite is created using the BaseMetricSuite, it already has the metric definition for date tracking.

One metric definition can refer to another metric definition of either the same Metric Suite or a more general one (in case there is the Generalization relationship between these Metric Suites).

  • No labels