Main Content

autosar.arch.loadModel

Load AUTOSAR architecture model

Since R2020a

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';
archModel = autosar.arch.loadModel(modelName)
archModel = 
  Model with properties:

              Name: 'autosar_tpc_composition'
    SimulinkHandle: 0.0033
        Components: [2x1 autosar.arch.Component]
      Compositions: [1x1 autosar.arch.Composition]
             Ports: [4x1 autosar.arch.ArchPort]
        Connectors: [7x1 autosar.arch.Connector]
        Interfaces: [0x0 Simulink.dictionary.archdata.PortInterface]
          Platform: 'Classic'

Copyright 2022 The MathWorks, Inc..

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.

Version History

Introduced in R2020a