Main Content

autosar.arch.createModel

Create AUTOSAR architecture model

Description

example

archModel = autosar.arch.createModel(modelName) creates and opens AUTOSAR architecture model modelName. The output argument archModel returns a model handle, which is an autosar.arch.Model object.

example

archModel = autosar.arch.createModel(modelName,openFlag) allows you to control whether the created AUTOSAR architecture model opens in the editor. Specify openFlag as false to create an architecture model without opening it in the editor.

Examples

collapse all

Create an AUTOSAR architecture model named myArchModel, open the model in the editor, and return model properties.

modelName = 'myArchModel';
archModel = autosar.arch.createModel(modelName)
archModel = 

  Model with properties:

              Name: 'myArchModel'
        Components: [0×0 autosar.arch.Component]
      Compositions: [0×0 autosar.arch.Composition]
             Ports: [0×0 autosar.arch.PortBase]
        Connectors: [0×0 autosar.arch.Connector]
    SimulinkHandle: 1.2207e-04

Create an AUTOSAR architecture model without opening it in the editor, and return model properties.

modelName = 'myArchModel';
archModel = autosar.arch.createModel(modelName,false)
archModel = 

  Model with properties:

              Name: 'myArchModel'
        Components: [0×0 autosar.arch.Component]
      Compositions: [0×0 autosar.arch.Composition]
             Ports: [0×0 autosar.arch.PortBase]
        Connectors: [0×0 autosar.arch.Connector]
    SimulinkHandle: 2.4414e-04

Input Arguments

collapse all

Name of the AUTOSAR architecture model to create.

Example: 'myArchModel'

Specify false to create an architecture model without opening it in the editor.

Example: false

Output Arguments

collapse all

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

Introduced in R2020a