Main Content

Configure Model Highlight and Sliced Models

Model Slicer

Set the properties of your model highlight and standalone sliced model using the Model Slicer configuration window.

Click the toggle mode button to switch between model edit mode and model highlight mode.

If automatic highlighting is disabled in the slice settings, refresh the model highlight using the refresh button . Refresh the highlight after changing the slice configuration.

Model Slicer Options

You can customize the slice behavior using the options dialog box, which is accessed with the options button .

Storage Options

Changes you make to a model slice configuration are saved automatically. You can store the slice configuration in the model SLX file, or in an external SLMS file. Saving the configuration externally can be useful if your SLX file is restricted by a change control system.

To set the storage location, click the options button in the Model Slicer and set the location in the Storage options pane.

Settings

Store in <model_name>.slx

Saves the model slice configuration in your model’s SLX file

Store in external file

Saves the model slice configuration in a separate SLMS file you specify by clicking the Save As button. The model slice configuration filename is shown in File.

Refresh Highlighting Automatically

Enables automatic refresh of a model highlight after changing the slice configuration.

Settings

on (default)

Model highlighting refreshes automatically.

off

Model highlighting must be refreshed manually. Click the refresh button in the Model Slicer to refresh the highlight.

Sliced Model Options

You can control what items are retained when you create a sliced model from a model highlight using the options in the Sliced model options pane.

OptionOn (selected)Off (cleared)

Retain signal observers

Signal observers, such as scopes, displays, and test condition blocks, are retained in the sliced model.

Signal observers are not retained in the sliced model (default).

Retain root-level inports and outports

Root-level ports are retained in the sliced model (default).

Root-level ports are not retained in the sliced model.

Expand trivial subsystems

Trivial subsystems are expanded in the sliced model and the subsystem boundary is removed (default).

Trivial subsystems are not expanded in the sliced model and the subsystem boundary is retained. See Trivial Subsystems.

Trivial Subsystems

If a subsystem has all of these characteristics, Model Slicer considers the subsystem trivial:

  • If the subsystem is virtual, it contains three or fewer nonvirtual blocks.

  • If the subsystem is atomic, it contains one or fewer nonvirtual blocks.

  • The subsystem has two or fewer inports.

  • The subsystem has two or fewer outports.

  • The active inport or outport blocks of the subsystem have default block parameters.

  • The system does not contain Goto Tag Visibility blocks.

  • In the Block Properties dialog box, the subsystem Priority is empty.

  • The data type override parameter (if applicable) is set to use local settings.

  • The subsystem does not contain Simulink Functions.

Note

If you generate a sliced model which does not remove contents of a particular subsystem, the subsystem remains intact in the sliced model.

Inline Content Options

When you create a sliced model from a highlight, model items can be inlined into the sliced model. The Inline content options pane controls which model components are inlined in generating a sliced model.

Model ComponentInlining on (selected)Inlining off (cleared)

Libraries

Model items inside sliced libraries are inlined in the sliced model and the library link is removed. (default)

Model items inside sliced libraries are not inlined in the sliced model and library link remains in place.

Masked subsystems

Model items inside sliced masked subsystems are inlined in the sliced model. (default)

The mask is retained in the sliced model.

Model items inside sliced masked subsystems are not inlined in the sliced model and the mask is retained.

Model blocks

Model items are inlined to the sliced model from the model referenced by the Model block. The Model block is removed. (default)

Note

Model Slicer cannot inline model blocks that are not in Normal mode.

Model items are not inlined to the sliced model from the model referenced by the Model block. The Model block is retained.

Variants

Model items are inlined to the sliced model from the active variant. Variants are removed. (default)

Model items are not inlined to the sliced model from the variant. The variant is retained.

Related Topics