addExclusionPoint
Class: SLSlicerAPI.SLSlicer
Namespace: SLSlicerAPI
Adds block handles, block paths, or Simulink Identifiers (SID) as slice exclusion point
Description
addExclusionPoint(
adds the obj
,ExclusionPoint
)ExclusionPoint
as the exclusion point in the model
slice for dependency analysis.
Input Arguments
Example
Exclusions at Block handles
Specifies the block handle. To get the block handle, use the getSimulinkBlockHandle
command.
1. Open sldvSliceClimateControlExample
model:
open_system('sldvSliceClimateControlExample');
Add block handles:
obj = slslicer('sldvSliceClimateControlExample'); blkH = get_param('sldvSliceClimateControlExample/Out1','Handle'); addExclusionPoint(obj,blkH);
2. To add multiple block handles as exclusion point, use cell array, for example:
blkH = {get_param('sldvSliceClimateControlExample/Out1','Handle'),... get_param('sldvSliceClimateControlExample/Out2','Handle')}; addExclusionPoint(obj,blkH);
Exclusions at Block Paths
Block path name, specified as a character vector or a cell array of character vectors.
open_system('sldvSliceClimateControlExample'); obj = slslicer('sldvSliceClimateControlExample'); bPath = {'sldvSliceClimateControlExample/Out1'}; addExclusionPoint(obj, bPath);
To add multiple block handles as exclusion point, use cell array, for example:
bPath = {'sldvSliceClimateControlExample/Out1',... 'sldvSliceClimateControlExample/Heater/HeaterAct'}; addExclusionPoint(obj, bPath);
Exclusions at SID
Simulink® Identifier, a unique designation assigned to a Simulink block or model annotation. To get the SID, use the Simulink.ID.getSID
command.
addExclusionPoint(obj, 'sldvSliceClimateControlExample:39')
Exclusions at LineHs
Handles of line that connects from the Inport block to the Outport block. To get the Line Handle, use get_param
command.
open_system('sldvSliceClimateControlExample'); obj = slslicer('sldvSliceClimateControlExample'); lh1 = get_param('sldvSliceClimateControlExample/Heater/Heat','LineHandles'); lh2 = get_param('sldvSliceClimateControlExample/Heater','LineHandles'); LineHs = [lh1.Inport(1), lh2.Outport(2)]; addExclusionPoint(obj,LineHs);
Alternatives
To open the Model Slicer manager, in the Simulink Editor, select the APPS tab, and click Model Slicer. To add the block as the exclusion point, in the model, right-click the block and select Model Slicer > Add as Exclusion Point.
Version History
Introduced in R2015b