Main Content

getActiveInstances

Returns all the active instances of subsystem references

Description

Simulink.SubsystemReference.getActiveInstances(path) returns all the active instances of subsystem reference blocks which point to the subsystem file.

Input Arguments

expand all

The path of the subsystem reference file that is being referred in other Subsystem blocks. You can also specify the handle of the subsystem reference.

Output Arguments

expand all

An array consisting of the path of all the active instances is returned.

Examples

Get all active instances of the subsystem

>>Simulink.SubsystemReference.getActiveInstances('mdl2/Subsystem Reference')

ans =

  4×1 cell array

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

Version History

Introduced in R2022a