Main Content

SLSlicerAPI.SLSlicer.ActiveBlocks

Class: SLSlicerAPI.SLSlicer
Package: SLSlicerAPI

Returns the active non-virtual block handles

Description

ActiveBlocks(obj) returns the active non-virtual block handles.

Input Arguments

expand all

Object containing Model Slicer configuration options.

Name-Value Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes.

This is an optional argument for including the virtual blocks in the list of blocks highlighted by Model Slicer.

Example:

open_system('sldvdemo_cruise_control');
slicerObj = slslicer('sldvdemo_cruise_control');
slicerObj.addStartingPoint('sldvdemo_cruise_control/Controller/throt');
slicerObj.highlight;
allActiveBlocks = slicerObj.ActiveBlocks('IncludeVirtual', true);

Example

open_system('sldvSliceClimateControlExample');
obj=slslicer('sldvSliceClimateControlExample');
activeblocks(obj);

Alternatives

To open the Model Slicer manager, in the Simulink® Editor, select the APPS tab, and click Model Slicer. To view the active blocks, simulate the model while the model is in slicer mode.

Introduced in R2015b