Class: Simulink.ModelManagement.Project.CurrentProject
Package: Simulink.ModelManagement.Project

(To be removed) Export Simulink project to Zip file

    Note:   Simulink.ModelManagement.Project.CurrentProject.export will be removed in a future release. Use export instead.


p = Simulink.ModelManagement.Project.CurrentProject()
export(p,, definitionType)


p = Simulink.ModelManagement.Project.CurrentProject() creates an instance of the CurrentProject class.

export(p, exports the project p to the Zip file specified in filename. filename can be a file name, in which case Simulink® exports the file to the current folder, or a fully qualified path name.

export(p,, definitionType) exports the project using the specified definitionType for the project definition files. If you do not specify definitionType, the project's current setting is used. Use the definitionType export option if you want to change project definition file management from the type selected when the project was created. definitionType can be Simulink.ModelManagement.Project.DefinitionFiles.SingleFile or Simulink.ModelManagement.Project.DefinitionFiles.MultiFile. MultiFile is better for avoiding merging issues on shared projects. SingleFile is faster but is likely to cause merge issues when two users both submit changes in the same project to a source control tool.


To export the currently open Simulink project to a Zip file, use the following commands.

  1. Create an instance of the CurrentProject class.

    p = Simulink.ModelManagement.Project.CurrentProject();
  2. Use the export method.

    export(p, '')
Was this topic helpful?