Simulink Blocks
Metric ID
slcomp.SimulinkBlocks
Description
Use this metric to count the of the number of Simulink® blocks, excluding Inport, Outport, and Goto blocks, in each layer of the model hierarchy for a unit or component.
Supported Artifacts
You can collect this metric for:
To control what the dashboard classifies as a unit or component, see Categorize Models in Hierarchy as Components or Units.
Computation Details
The metric:
Does not include Inport, Outport, and Goto blocks in the block count.
Counts the blocks, excluding Inport, Outport, and Goto blocks, in each variant.
Does not count blocks that are commented out.
Collection
To collect data for this metric:
In the Model Maintainability Dashboard, point to the Simulink Architecture section and click the Run metrics for widget icon. If you click on the widget in the Blocks row and Count column, you can view a table that shows the number of Simulink blocks, excluding Inport, Outport, and Goto blocks, in each layer of a unit or component.
Use
getMetrics
with the metric identifierslcomp.SimulinkBlocks
.
Results
For this metric, instances of metric.Result
return
Value
as the number of Simulink blocks, excluding Inport, Outport, and
Goto blocks, in each layer of a unit or component.