Main Content

getAllInstances

Returns all subsystem reference blocks inside a block diagram

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

<argumentlist xml:id="mw_22a70f13-1424-407f-9b80-258a8f2b8e85">

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

</argumentlist>

Examples

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

ans =

  2×1 cell array

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

Version History

Introduced in R2022a