Export to C Code

When you export models to C code, a *.c file is generated for each output, as well as model-specific C files. For more information about these files, see LINK.

Export a model to C code

  1. File > Export Model > C Code

    ClosedExport to C Code window

  2. Set the Base Name (defines the file names <base name>_<output>) and the Target Folder.

    1. Select the Inputs and Outputs to export in the table. The order in which the inputs are passed to the exported model can be changed using the and buttons.

      You can use the standard Ctrl/Shift selection functions in the table, or click and hold Lmb and drag the cursor over the cells/rows you want to select. The position of the inputs in the exported model is shown in the # column.

      To export only used inputs, select Used Inputs Only.

  3. Click Export.

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