Main Content


(Not recommended) Get project file dependencies

simulinkproject is not recommended. Use currentProject or openProject instead. For more information, see Compatibility Considerations.



files = listRequiredFiles(proj,file) returns the files that the specified file requires to run.


collapse all

Open the airframe project, create a project object and get a file.

proj = simulinkproject;
file = 'models/slproject_f14.slx'

Get the files required by the specified file.

files = listRequiredFiles(proj, file);

Input Arguments

collapse all

Project, specified as a project object. Use simulinkproject to create a project object to manipulate a project at the command line.

Path of the file relative to the project root folder, including the file extension, specified as a character vector, an absolute file path or an instance of a project file object. The file must be within the root folder.

Example: ‘models/myModelName.slx’

Output Arguments

collapse all

Required files, returned as a cell array of character vectors.

Compatibility Considerations

expand all

Not recommended starting in R2019a

Introduced in R2017a