Quantcast

Documentation Center

  • Trial Software
  • Product Updates

export

Export Simulink Project to zip

Syntax

  • export(proj,zipFileName) example
  • export(proj,zipFileName,definitionType)

Description

example

export(proj,zipFileName) exports the project proj to a zip file specified by zipFileName. The zip archive preserves the project files, structure, labels, and shortcuts, and does not include any source control information. You can use the zip archive to send the project to customers, suppliers, or colleagues who do not have access to your source control repository. Recipients can create a new project from the zip archive by selecting New > Simulink Project > From Archive in the Simulink® Project Tool.

export(proj,zipFileName,definitionType) exports the project using the specified definitionType for the project definition files, single or multiple. 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.

Examples

expand all

Export a Project to a Zip File

Open the airframe project and create a project object.

sldemo_slproject_airframe;
proj = simulinkproject;

Export the project to a zip file.

export(proj,'airframeproj.zip')

Input Arguments

expand all

proj — Projectproject object

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

zipFileName — Zip file name or pathstring

Zip file name or path, specified as a string ending in the file extension .zip. If zipFileName is a filename, Simulink exports the file to the current folder. You can also specify a fully qualified path name.

Example: 'project.zip'

Data Types: char

definitionType — Definition file typeslproject.DefinitionFiles.SingleFile | slproject.DefinitionFiles.MultiFile

Definition file type, specified as slproject.DefinitionFiles.SingleFile or slproject.DefinitionFiles.MultiFile. Use the definitionType export option if you want to change project definition file management from the type selected when the project was created. MultiFile is better for avoiding merging issues on shared projects. SingleFile is faster but is likely to cause merge issues when two users submit changes in the same project to a source control tool.

Example: export(proj,'proj.zip',slproject.DefinitionFiles.SingleFile)

Was this topic helpful?