Main Content

save

Class: Simulink.CodeImporter
Package: Simulink

Save import settings to JSON format text file

Syntax

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

Description

filepath = obj.save(filename) or filepath = obj.save(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 = obj.save(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