save_project_as - 2022.1 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
Release Date
2022.1 English

Save the current project under a new name


save_project_as [‑scan_for_includes] [‑exclude_run_results]
    [‑include_local_ip_cache] [‑force] [‑quiet] [‑verbose] <name> [<dir>]


Saved project object.


Name Description
[-scan_for_includes] Scan for include files and add them to the new project
[-exclude_run_results] Exclude run results in the new project
[-include_local_ip_cache] Include IP cache results in the new project
[-force] Overwrite existing project directory
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<name> New name for the project to save
[<dir>] Directory where the project file is saved Default: .




Saves a currently open project file under a new name in the specified directory, or in the current working directory if no other directory is specified.

This command save a Vivado® Design Suite project file (.xpr), or a project file for the Vivado Lab Edition (.lpr), in the specified directory.

The command returns the name of the saved project, or returns an error if it fails.


-scan_for_includes - (Optional) Scans all source files and adds any referenced Verilog 'include files into the project structure.

-exclude_run_results - (Optional) Exclude run results in the new project. This strips the project of its current run results to make a copy of the project sources without the additional data.

-include_local_ip_cache - (Optional) Include IP cache results in the new project. This allows you to retain the out-of-context synthesis cache with the new project.

-force - (Optional) Overwrite the existing project. If the project name is already define in the specified directory then you must also specify the -force option for the tool to overwrite the existing project.
Note: If the existing project is currently open, the new project will overwrite the existing project on the disk, but both projects will be opened in the tool. In this case you should probably run the close_project command prior to running create_project.
-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.

<name> - (Required) The name of the new project. This argument must appear before the specified directory. Since these commands do not have parameters, the tool interprets the first argument as <name> and uses the second argument as <dir>. The project file is saved as <name>.xpr in the Vivado Design Suite, or <name>.lpr in the Vivado Lab Edition, and is written into the specified directory <dir>.

<dir> - (Optional) The directory name in which to write the new project file. If the specified directory does not exist a new directory will be created. If the directory is specified with the complete path, the tool uses the specified path name. However, if <dir> is specified without a path, the tool looks for or creates the directory in the current working directory, or the directory from which the tool was launched.

Note: When creating a project in GUI-mode, the tool appends the filename <name> to the directory name <dir> and creates a project directory with the name <dir>/<name> and places the new project file and project data folder into that project directory.


The following example saves the active project as a new project called myProject in a directory called myProjectDir:
save_project_as myProject myProjectDir
Note: Because <dir> is specified as the folder name only, the tool will create the project in the current working directory, or the directory from which the tool was launched.
The following example saves the current project to a new project called myProject in a directory called C:/Designs/myProjectDir. If you use the -force argument, the tool will overwrite an existing project if one is found in the specified location.
save_project_as myProject C:/Designs/myProjectDir -force