Export to Simulink® Script

A Simulink installation is not required to perform the export.

When you export a model to Simulink Script, an M script file (*.m) and a TLC file are generated for each output. The script can later be used to create a Simulink model. For more information, see .

Export a model to Simulink® script

  1. File > Export Model > Simulink Script.

    ClosedExport to Simulink Script (*.m)window

  2. Set the Target File: Defines the location path and the file name (<file name>_<model name>) for the export file.

  3. Set the Model Type: Specifies the model type of the export file (*.mdl or *.slx) created when the script is executed.
    1. Select the Inputs and Outputs to export in the table.

      To export only used inputs, select Used Inputs Only.

  4. Select Outputs and Inputs. Optionally, change the inputs order and use "Used Inputs only" checkbox.

  5. Click Export.

  6. The export starts and the files are saved to the specified path. A link to the export folder is displayed in the log window.