Main Content

autosar.arch.loadModel

Load AUTOSAR architecture model

Description

example

archModel = autosar.arch.loadModel(modelName) loads AUTOSAR architecture model modelName into memory without opening the model in the editor. The output argument archModel returns a model handle, which is an autosar.arch.Model object. After you load a model into memory, you can work with it by using architecture functions or open the model in the editor by using the open function. Save changes by using the save function.

Examples

collapse all

Load an AUTOSAR architecture model into memory without opening the model in the editor, and return model properties.

modelName = 'autosar_tpc_composition';
addpath(fullfile(matlabroot,'/examples/autosarblockset/main'));
archModel = autosar.arch.loadModel(modelName)
archModel = 

  Model with properties:

              Name: 'autosar_tpc_composition'
        Components: [2×1 autosar.arch.Component]
      Compositions: [1×1 autosar.arch.Composition]
             Ports: [4×1 autosar.arch.ArchPort]
        Connectors: [7×1 autosar.arch.Connector]
    SimulinkHandle: 0.0031

Input Arguments

collapse all

Name of the AUTOSAR architecture model to load into memory.

Example: 'myArchModel'

Output Arguments

collapse all

Returns an AUTOSAR architecture model handle, which is an autosar.arch.Model object.

Introduced in R2020a