slslicertrace

Return block handles in sliced model or source model after using Model Slicer

Description

slslicertrace('slice',object) returns the block handles in the sliced model that correspond to blocks specified by object in the source model.

example

slslicertrace('source',object) returns the block handles in the source model that correspond to blocks specified by object in the sliced model.

Examples

collapse all

Highlight the Switch block in the sldvSliceClimateControlExample source model.

Open the sldvSliceClimateControlExample example model.

addpath(fullfile(docroot,'toolbox','simulink','examples'));
open_system('sldvSliceClimateControlExample');

Create a slicer object obj and add Out1 as the starting point.

obj = slslicer('sldvSliceClimateControlExample');
activate(obj);
addStartingPoint(obj,'sldvSliceClimateControlExample/Out1');
highlight(obj)

Create a sliced model by using slice.

slice(obj,'sldvSliceClimateControlExample_sliced')

Highlight the On Switch block in the source model by using slslicertrace

h=slslicertrace('SOURCE', 'sldvSliceClimateControlExample_sliced/Refrigeration/On');
hilite_system(h);
terminate(obj);

Input Arguments

collapse all

An object can be specified as an array of block handles, cell arrays of block paths, or cell arrays of Simulink Identifiers (SID).

Introduced in R2015b