Main Content


Class: SLSlicerAPI.SLSlicer
Package: SLSlicerAPI

Add block handles, block paths, or Simulink Identifiers (SID) as the slice starting point


addStartingPoint(obj,StartingPoint) adds StartingPoint as slice starting point for dependency analysis.

Input Arguments

expand all

Class containing Model Slicer configuration options.


Starting Point at Block Handles

Specifies the block handle. To get the block handle, use the getSimulinkBlockHandle command.

blkH = get_param('sldvSliceClimateControlExample/Out1','Handle');

To add multiple block handles as starting point, use cell array, for example:

blkH = {get_param('sldvSliceClimateControlExample/Out1','Handle'),...

Starting Point at Block Path

Block path name, specified as a character vector or a cell array of character vectors.

bPath = {'sldvSliceClimateControlExample/Out1'};
addStartingPoint(obj, bPath);

To add multiple block paths as starting point, use cell array, for example:

bPath = {'sldvSliceClimateControlExample/Out1',...
addStartingPoint(obj, bPath);

Starting Point at SID

Simulink® Identifier, a unique designation assigned to a Simulink block or model annotation. To get the SID, use the Simulink.ID.getSID command.

addStartingPoint(obj, 'sldvSliceClimateControlExample:39')

Starting Point at LineHs

Handles of line that connects from the Inport block to the Outport block. To get the Line Handle, use get_param command.

 lh1 = get_param('sldvSliceClimateControlExample/Heater/Heat','LineHandles');
 lh2 = get_param('sldvSliceClimateControlExample/Heater','LineHandles');
 LineHs = [lh1.Inport(1), lh2.Outport(2)];


To open the Model Slicer manager, in the Simulink Editor, select the APPS tab, and click Model Slicer. To add a block or signal as the starting point, in the model, right-click the block and select Model Slicer > Add as Starting Point.

Introduced in R2015b