Main Content

importFromFile

Import Simulink object definitions from file to Architectural Data section of data dictionary

Since R2023b

    Description

    example

    importFromFile(archDataObj,matFileName) copies Simulink.Bus, Simulink.ValueType, Simulink.AliasType, and constant objects from the MAT file specified by matFileName to the Architectural Data section of a data dictionary identified by archDataObj. The Simulink.Bus objects are imported as data interfaces. For those objects that need to be used as structure DataType, use the convertToDataInterface and convertToStructType functions respectively.

    Examples

    collapse all

    To import Simulink.Bus, Simulink.ValueType, Simulink.AliasType, and constant objects from a MAT file to the Architectural Data section of a data dictionary, use the importFromFile function. For an example that shows more of the workflow for related functions, see Create Architectural Data Object and Use It to Configure Architectural Data.

    importFromFile(archDataObj,"myMatFile.mat");

    Input Arguments

    collapse all

    Architectural Data object, specified as a Simulink.dictionary.ArchitecturalData object.

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

    Example: "myMatFile.mat"

    Version History

    Introduced in R2023b