Main Content

ActiveBlocks

Class: SLSlicerAPI.SLSlicer
Namespace: 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:

openExample('sldv/CruiseControlTestGenerationExample')
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

openExample('slcheck/AddStartingPointAndHighlightTheModelSliceExample','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.

Version History

Introduced in R2015b