Documentation

addShutdownFile

Add shutdown file to project

Syntax

addShutdownFile(proj, file)

Description

example

addShutdownFile(proj,file)adds a shutdown file to the projectproj. When you close the project, it runs the shutdown file automatically. Use the shutdown list to specify executable MATLAB®code to run as the project shuts down.

Examples

collapse all

Open the airframe project and create a project object.

sldemo_slproject_airframe proj = simulinkproject;

Specify executable MATLAB code to run as the project shuts down.

filepath = fullfile('utilities','rebuild_s_functions.m');

                    

Automatically run the file when the project closes, by making it a shutdown file.

addShutdownFile(project, filepath);

Input Arguments

collapse all

Project, specified as a project object. Usesimulinkprojectto create a project object to manipulate a Simulink®Project at the command line.

Path of the MATLAB file to add relative to the project root folder, including the file extension, specified as a character vector. The file must be within the root folder.

Example:‘utilities/myscript.m’

See Also

Introduced in R2017b

Was this topic helpful?