Main Content

slreq.closeRequirementsManager

Close Requirements Manager app in model

    Description

    example

    slreq.closeRequirementsManager(model) closes the Requirements Manager app in the Simulink® model model and brings the model to the front.

    example

    slreq.closeRequirementsManager("all") closes the Requirements Manager app in all open models.

    Examples

    collapse all

    This example shows how to open and close the Requirements Manager app programmatically.

    Open the CruiseRequirementsExample project and open the crs_plant model.

    slreqCCProjectStart;
    open_system("crs_plant");

    Open the Requirements Manager app in the crs_plant model.

    slreq.openRequirementsManager("crs_plant");

    Close the Requirements Manager app in the crs_plant model.

    slreq.closeRequirementsManager("crs_plant");

    This example shows how to close the Requirements Manager app in all open models.

    Open the CruiseRequirementsExample project. Open the crs_plant and crs_controller models.

    slreqCCProjectStart;
    open_system("crs_plant");
    open_system("crs_controller");

    Open the Requirements Manager app in the crs_plant and crs_controller models.

    slreq.openRequirementsManager("crs_plant");
    slreq.openRequirementsManager("crs_controller");

    Close the Requirements Manager app in all open models.

    slreq.closeRequirementsManager("all");

    Input Arguments

    collapse all

    Simulink model to close the Requirements Manager app in, specified as a string scalar or character vector that contains the name of the model, or a model handle.

    Tips

    • Use bdroot (Simulink) to get the top-level model of the current system.

    • Use get_param (Simulink) and bdroot (Simulink) to get the handle for the top-level model of the current system:

      model = get_param(bdroot,"Handle");

    Version History

    Introduced in R2021a