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 byobjectin the source model.

example

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

Examples

collapse all

Highlight theSwitchblock in thesldvSliceClimateControlExamplesource model.

Open thesldvSliceClimateControlExampleexample model.

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

Create a slicer objectobjand addOut1as the starting point.

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

Create a sliced model by usingslice.

slice(obj,'sldvSliceClimateControlExample_sliced')

Highlight theOnSwitchblock in the source model by usingslslicertrace

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

Input Arguments

collapse all

Anobjectcan 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