Export project to archive
exports the specified project to a new project archive file named
archiveName must include
.mlproj extension or no extension at all. If no extension is
specified, MATLAB® appends the
.mlproj extension to the file.
The project archive preserves the project files, structure, labels, and shortcuts, and does not include any source control information. You can use the project archive to send the project to customers, suppliers, or coworkers who do not have access to your source control repository. Recipients can create a new project from the archive by double-clicking the project archive file.
By default, this function packages all the project references in the archive. You might not want this option if the project contains references to absolute networks paths. In this case, the function duplicates the project itself and treats it as a relative reference upon extraction.
Export Project to an Archived Project File
Open the Times Table App project. Use
to create a project object from the currently loaded project.
matlab.project.example.timesTable proj = currentProject;
Export the project to an archived project file.
You can now send someone the project by sharing the file
timestableproj.mlproj with them.
proj — Project
Project, specified as a
currentProject to create a project object from the currently
archiveName — Archive file name or path
character vector | string scalar
Archive file name or path, specified as a character vector or string
scalar ending in the file extension
.mlproj. If no
extension is specified, MATLAB appends the
.mlproj extension to the file
archiveName is a file name, MATLAB exports the file to the current folder. You also can specify a
fully qualified path name.
archiveReferences — Include references in packaging
true (default) | false
Include references in the package, specified as true or false.
If true, MATLAB exports the project and includes the references in the package. Extracting the archive creates a copy of the referenced projects and links them to the top-level project. It also includes a copy of projects referenced by your referenced projects.
If false, MATLAB exports the project and preserves the existing absolute and relative link to the references. For a working project on extraction, the references must be at the same absolute and relative paths.
The argument is ignored if the project does not have references.