Simulink Design Information
R2026bMetric ID
sldesignlayer.SimulinkDesignInfo
Description
This metric summarizes design information for Simulink® models and subsystems. The metric combines several Simulink design metrics into a single result to help you assess size, architecture, and complexity of your block diagrams and subsystems.
For each Simulink design layer, the metric returns the:
Number of Simulink blocks, excluding Inport, Outport, From, and Goto blocks
Number of Simulink decisions
Number of Goto blocks
Number of interface ports
Number of Simulink signal lines
Halstead complexity metrics, including operators, operands, volume and difficulty
A Simulink design layer is an artifact, such as a block diagram or subsystem, that has its own canvas in Simulink.
Supported Artifacts
You can collect this metric for Units and Components. To control what the dashboard classifies as a unit or component, see Categorize Models in Hierarchy as Components or Units.
Computation Details
The metric combines metric data from these individual metrics:
Collection
To collect data for this metric, execute the metric engine using the metric ID.
metric_engine = metric.Engine;
results = execute(metric_engine,"sldesignlayer.SimulinkDesignInfo")Results
The metric returns results for each Simulink design layer in the units and components in your project. For each design layer,
the metric returns a metric.Result object.
The Value property is a structure with these fields:
Blocks— Number of Simulink blocksDecisions— Number of Simulink decisionsGotos— Number of Goto blocksInterfacePorts— Structure with fields:In— Number of Inport blocksOut— Number of Outport blocks
SignalLines— Number of Simulink signal linesHalstead— Structure with fields:TotalOperators— Number of Simulink blocksUniqueOperators— Number of unique Simulink blocksTotalOperands— Number of inports and outportsUniqueOperands— Number of output signals from each Simulink blockVolume— Size of the design layerDifficulty— Estimate of how difficult the design layer is to read and write