Main Content

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.

1. Open the sldvSliceClimateControlExample example model.

open_system('sldvSliceClimateControlExample');

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

obj = slslicer('sldvSliceClimateControlExample');
activate(obj);
Consider turning on Fast Restart before launching Model Slicer for simulation based workflows. Do not show again.
addStartingPoint(obj,'sldvSliceClimateControlExample/Out1');
highlight(obj)

3. Create a sliced model by using slice.

slice(obj,'sldvSliceClimateControlExample_sliced')
ans = 
'sldvSliceClimateControlExample_sliced'

4. 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).

Version History

Introduced in R2015b