Main Content

Visually Organize Models Using Area Annotations

You can add area annotations to your model to visually group related model elements.

Areas have these properties:

  • You can label an area.

  • All model elements inside an area, including the label, move with the area and maintain their spatial relationship as they move.

  • Areas have a solid background color.

    Tip

    If you want to want to use an image as a background for a set of model elements, use an image annotation. For more information about image annotations, see Create Image Annotations.

    Unlike model elements inside an area, model elements on top of an image annotation do not move with the annotation. If you want a background image and the ability to move the model elements together with the image, consider adding both the elements and an image annotation to an area.

You can convert part of an existing block diagram to an area, or you can add a blank area to your model and insert model elements.

To convert part of an existing block diagram to an area:

  1. Drag a box around the area of interest in the canvas.

  2. From the action bar, click Create Area.

    Block diagram with the action bar showing, and the cursor hovering over the Create Area button

  3. Type the name of the area. The name appears in the upper-left corner of the area.

    Block diagram with area, and the area title showing in its upper-left corner

To add a blank area:

  1. In the canvas, click and drag over a blank area to draw the area shape.

  2. From the action bar, click Area.

    Blank area of canvas selected, with the action bar showing, and the cursor hovering over the Area button

  3. Type the name of the area.

To add a model element to an area, either drag the element into the bounds of the area. Alternatively, expand the area to encompass the element by clicking and dragging the corners of the area outward.

Area with a Gain block being dragged by a pointer in it, and an arrow indicating the path of the Gain block being moved from outside the area to inside the area

To move an area, pause on one of the edges of the area. When the gray bar appears, click and drag the area to the new position.

To move an area without moving its contents, press Alt while you click and drag the area. On macOS, press Option instead.

On the left, an area containing a Gain block, and on the right, the area moved relative to the Gain block

To change the label text of an area, select the area, click the ? in the upper left corner, and type the new label text.

On the left, a selected area showing a ? in the upper left corner, and on the right, the same area showing the text "Label Text" in the upper left corner

To create a copy of an area, press Ctrl while you click and drag the area. The contents of the area will also copy.

Area containing a single Gain block and floating over it, a copy of the area and its contents

To change to color of an area, in the Simulink® Toolstrip, on the Format tab, in the Style section, click Foreground. You can select a color from the menu or click Custom Color to define your own color.

Tip

To specify colors programmatically, see Specify Colors Programmatically.

On the left, a purple area containing a Gain block, and on the right, the same area in yellow

Related Topics