Main Content

getAllInstances

Returns all subsystem reference blocks inside a block diagram

Since R2022a

Description

Simulink.SubsystemReference.getAllInstances(path) returns all subsystem reference blocks inside a block diagram.

Input Arguments

expand all

The path of the system or model name specified as string. You can also specify the handle of the system or model name.

Output Arguments

expand all

It returns an array consisting of the path of all the subsystem reference blocks that is inside a block diagram.

Examples

>> Simulink.SubsystemReference.getAllInstances('mdl1')

ans =

  2×1 cell array

    {'mdl1/Subsystem1'                   }
    {'mdl1/Subsystem/Subsystem Reference'}

Version History

Introduced in R2022a