Main Content

getActiveInstances

Returns all the active instances of subsystem references

Since R2022a

Description

example

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

expand all

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