Configure Model Element Names and Labels - MATLAB & Simulink (original) (raw)

You can change model element names, hide them, and change their location on a signal line or block.

In addition to block names, In Bus Element and Out Bus Element blocks also have labels. Depending on what type of element the block is handling, the label describes a bus, signal, or message.

In Bus Element with the name and label indicated on the block

Label Signal Lines

To label a signal line, double-click the signal line, then type the label. For the label naming requirements, see Signal Names and Labels.

To change an existing signal line label, double-click the label, then type the new label.

Move Signal Line Labels

By default, signal line labels appear below horizontal signal lines and to the left of vertical signal lines. To change the location of a block name, drag the signal line label to either side of the signal line.

Change Block Names

The Simulink® Editor names blocks when you add them to a model. The first occurrence of the block is the library block name, for example, Gain. The next occurrence is the block name with a number appended. Each new block increments the number, for example, Gain1, Gain2, and so on. These names are called automatic names.

Note

Copying and pasting blocks whose names follow numeric order (Gain1, Gain2, and so on) creates names that follow standard sorting order conventions for ASCII characters.

To change the block name:

  1. Select the block.
  2. Double-click the block name.
  3. Type the new name.

Hide or Display Block Names

You can edit block names when they are displayed.

By default, the automatic names that the Simulink Editor assigns to new blocks you add to the model are hidden. Non-automatic names are displayed. For example, if you add your second gain block to a model, the automatic name, Gain2, is hidden by default. If you rename the block, the new name is displayed by default.

To temporarily display a block name, pause on the block.

Note

Pausing on a block temporarily displays the block name irrespective of all other settings.

To persistently display or hide a block name, click the block. Pause on the ellipsis (…) that appears. In the action bar that expands, click Show Block Name or Hide Block Name .

To persistently set the visibility of all blocks with automatic names, select one or multiple blocks. In the Simulink Toolstrip, on the Format tab, in the Block Layout section, click the button labeled , , or depending on its current setting.

To persistently set the visibility of a selected set of blocks, select one of the options above the Model Settings section instead.

Move Block Names

By default, block names appear below blocks whose ports are on the sides and to the left on blocks whose ports are on the top and bottom. To change the location of a block name, do one of these:

See Also

Topics