Main Content

Simulink.SubsystemReference.getAllReferencedSubsystemBlockDiagrams

Return all subsystem files referenced in model

Since R2022a

    Description

    ssFiles = Simulink.SubsystemReference.getAllReferencedSubsystemBlockDiagrams(mdl) returns all the subsystem files referenced in the model mdl.

    example

    Examples

    collapse all

    Load the model slexModelUsingReusableSS containing referenced subsystems.

    load_system("slexModelUsingReusableSS");

    Get the paths of the subsystem files referenced in the model.

    Simulink.SubsystemReference.getAllReferencedSubsystemBlockDiagrams...
        ("slexModelUsingReusableSS")
    ans = 
    'slexReusableSS'
    

    Input Arguments

    collapse all

    Path or handle of a model, specified as a string scalar or character vector.

    Example: "slexModelUsingReusableSS"

    Data Types: string | char

    Output Arguments

    collapse all

    Paths or handles of subsystem files referenced in a model, returned as a character vector or cell array of character vectors. The type of output depends on the input type. If you specify the path of model, the function returns the paths of subsystem files.

    Version History

    Introduced in R2022a