Main Content

systemcomposer.loadModel

Load System Composer model

    Description

    model = systemcomposer.loadModel(modelName) loads the architecture model with name modelName and returns the systemcomposer.arch.Model object. The loaded model is not displayed. The architecture model must exist on the MATLAB® path.

    example

    Examples

    collapse all

    Create, save, and load a model. Display the model's properties.

    model = systemcomposer.createModel("new_arch");
    systemcomposer.openModel("new_arch");
    model.save;
    loadedModel = systemcomposer.loadModel("new_arch")
    
    loadedModel = 
    
      model with properties:
    
                       Name: 'new_arch'
               Architecture: [1×1 systemcomposer.arch.Architecture]
             SimulinkHandle: 2.0005
                      Views: [0×0 systemcomposer.view.ViewArchitecture]
                   Profiles: [0×0 systemcomposer.profile.Profile]
        InterfaceDictionary: [1×1 systemcomposer.interface.Dictionary]

    Input Arguments

    collapse all

    Name of model, specified as a character vector or string.

    Example: "exMobileRobot"

    Data Types: char | string

    Output Arguments

    collapse all

    Architecture model, returned as a systemcomposer.arch.Model object.

    More About

    collapse all

    Version History

    Introduced in R2019a