Main Content


Class: Simulink.CodeImporter
Namespace: Simulink

Save import settings to JSON format text file

Since R2020a


filepath = save(obj, filename)
filepath = save(obj, filename, 'Overwrite', 'Off')
filepath = save(obj, filename, 'Overwrite', 'On')


filepath = save(obj, filename) or filepath = save(obj, filename, 'Overwrite', 'Off'), where obj is an object of class Simulink.CodeImporter, saves import settings in JSON format to the specified file filename and returns the full path to the saved file. Import settings include LibraryFileName, OutputFolder, CustomCode, Options, selected functions and types, and function configurations. You can subsequently load the settings from this file using the load method.

filepath = save(obj, filename, 'Overwrite', 'On') overwrites the specified file filename if the file already exists.

Input Arguments

expand all

Name or path of file to be used to save import settings, specified as a character vector or string scalar.

Example: 'importsettings.json'

Data Types: char | string

Output Arguments

expand all

Full path to saved file, returned as a character vector.

Version History

Introduced in R2020a