Main Content

rmimap.map

Associate link set with model

    Description

    example

    rmimap.map(model,myLinkSet) associates the link set myLinkSet with the Simulink® model model.

    example

    rmimap.map(model,"undo") reverts the link set mapping to the previously stored mapping for the Simulink model. For more information, see Link Set Mapping.

    example

    rmimap.map(model,"clear") reverts the link set mapping to the default mapping. For more information, see Default Link Set Mapping.

    Examples

    collapse all

    This example shows how to associate a link set file with a Simulink model.

    Open the model. Define the path to the link set file.

    model = "slvnvdemo_powerwindowController";
    open_system(model);
    myLinkSet = fullfile("slvnvdemo_powerwindowRequirements.slmx");

    Clear any existing link sets associated with the model.

    rmimap.map(model,"clear");
    Nothing to clear for ...\slvnvdemo_powerwindowController.slx
    

    Associate the link set with the model.

    rmimap.map(model,myLinkSet);
    Mapping ...\slvnvdemo_powerwindowController.slx to ...\slvnvdemo_powerwindowRequirements.slmx
    

    Revert to the previously stored link set mapping.

    rmimap.map(model,"undo")
    Removing C:\Users\jdoe\MATLAB\Examples\slrequirements-ex91255337\slvnvdemo_powerwindowRequirements.slmx for ...\slvnvdemo_powerwindowController.slx
    

    Input Arguments

    collapse all

    File path of the Simulink model, specified as a string scalar or character vector.

    Full path of the SLMX file that contains links for the model, specified as a string scalar or character vector.

    More About

    collapse all

    Link Set Mapping

    Requirements Toolbox maps a link set to a Model-Based Design artifact, such as a Simulink model, when you associate a link set with the artifact. When you open the artifact, the mapped link sets also open.

    Default Link Set Mapping

    The default link set mapping for a Model-Based Design artifact is the link set in the same folder as the source artifact with the name that combines the source artifact name and source artifact extension, separated by a tilde. For example, the link set mapping for myAdd.m is myAdd~m.slmx in the same folder as myAdd.m.

    Version History

    Introduced in R2015a