2.2.4.38.63 Project::Save

Description

Save the active project.

Syntax

BOOL Save( LPCSTR lpcszFilename = NULL, BOOL bRename = true )

Parameters

lpcszFilename
[input]The path and name of the file to save to. If NULL then save to the current path using the project's current name
bRename
[input]Set to false to save to a backup project file without changing the name of the current open project.

Return

TRUE for success, otherwise FALSE.

Examples

EX1

void    run_Project_Save()
{
    string        strPathNameToSave = "c:\\myproj.opj";
    
    if (Project.Save(strPathNameToSave))
        out_str("Project saving succeeded.");
    else
        out_str("Project saving failed!");
}

Remark

This function is restricted when a modal dialog is open. There is no such restriction for modeless dialogs.

Note: Starting with Origin 2017 SR0, Project::Save will save the project even if a modal dialog is open.

See Also

Project::Open

Header to Include

origin.h