Main Content

Simulink.SubsystemReference.isSystemLocked

Check if subsystem file is locked due to edit or update

Since R2022a

    Description

    Simulink.SubsystemReference.isSystemLocked(ssFile) returns a logical 1 (true) if the subsystem file ssFile is locked due to an edit or update to the subsystem file or its instance in a model. Otherwise, it returns a logical 0 (false).

    example

    Examples

    collapse all

    Open the model slexModelUsingReusableSS containing three instances of the subsystem file slexReusableSS.

    model = "slexModelUsingReusableSS";
    open_system(model);

    Add a Scope block to the subsystem reference instance Double Input in the model.

    add_block('simulink/Sinks/Scope',...
       'slexModelUsingReusableSS/Double Input/Scope');

    Check if the subsystem file is locked for editing.

    ssRef... 
     = Simulink.SubsystemReference.isSystemLocked("slexReusableSS")
    ssRef = logical
       1
    
    

    Input Arguments

    collapse all

    Path or handle of a subsystem file, specified as a string scalar, character vector, or double.

    Example: "slexReusableSS"

    Data Types: string | char | double

    Version History

    Introduced in R2022a