Hauptinhalt

importFromFile

Import Simulink object definitions

Since R2022b

In R2023b the Architectural Data section of data dictionaries was introduced. When managing interfaces, data types, constants, and software address methods consider using the Simulink.dictionary.ArchitecturalData programmatic interfaces instead. For more information, see Programmatically Manage AUTOSAR Architectural Data.

Description

importFromFile(dictObjmatFileName) copies Simulink.Bus, Simulink.ValueType, and Simulink.AliasType objects from the specified MAT file to the interface dictionary identified by dictObj. The Simulink.Bus objects are imported as data interfaces. For those objects that need to be used as structure DataType, these objects can be cut and pasted in the interface dictionary to the Interfaces tab after the import operation.

example

Examples

collapse all

To import Simulink.Bus, Simulink.ValueType, and Simulink.AliasType objects from the specified MAT file to the interface dictionary, use the importFromFile function. For an example that shows more of the workflow for related functions, see Create and Configure Interface Dictionary.

importFromFile(dictAPI,'myMatFile.mat');

Input Arguments

collapse all

Interface dictionary, specified as a Simulink.interface.Dictionary object. Before you use this function, create or open dictObj by using Simulink.interface.dictionary.create or Simulink.interface.dictionary.open.

Name of MAT file, specified as a character vector or string. The name must include the .mat extension and must be a valid MATLAB® identifier.

Example: 'myMatFile.mat'

Version History

Introduced in R2022b

collapse all