CapSLBridge.import
Function to import Capella model elements from an
.mlcore
file.
Syntax
Description
CapSLBridge.import
CapSLBridge.import opens an Explorer window to select the
.mlcore file you want to import.
By default, this command creates a new MATLAB Project based on the MATLAB Project template "Cap2SL" provided by this
toolbox.
The project is created in the folder userpath/<CapellaProjectName> and
the
project name is the Capella Project name.
The import of all the elements populates several files in the various project folders.
These files are then initialized with elements representing exported Capella elements.
If a project already exists then the function imports the elements in this existing project.
CapSLBridge.import(Name, Value)
CapSLBridge.import(Name,Value)
creates or updates a project according to the criteria specified by one or more
Name, Value
pair arguments.
You can use this syntax to specify the project path as well as the .mlcore file
to import.
Name-Value Pair Arguments
Specify optional comma-separated pairs of Name,Value arguments.
Name is the argument name and Value is the
corresponding value.
Name must appear inside quotes.
You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
Supported values for
Name are:
'ModelPath' — Define the path to the .mlcore
file
character vector
Example:
CapSLBridge.import('ModelPath', 'C:\tmp\myMLCore.mlcore')
imports the specified
.mlcore file in the default folder
userpath/<CapellaProjectName>.
'ProjectPath' — Define the path of the project
character vector
Example:
CapSLBridge.import('ProjectPath', 'C:\tmp\myProjectFolder')
opens an Explorer window to select the
.mlcore file you want to import, then
creates
or updates the project at the specified location.