2.2.4.13.24 Folder::SaveAsProject

Description

Save a folder as an Origin project file

Syntax

BOOL SaveAsProject( LPCSTR lpcszPath, DWORD dwCntrl = SFC_INCLUDE_SUBFOLDERS )

Parameters

lpcszPath
[input] specify the path
dwCntrl
[input] additional flags to control the save
may include one or more of the following bits defined in OC_const.h :
SFC_INCLUDE_SUBFOLDERS - specifies if subfolders must be saved to project
SFC_INCLUDE_ATTACHED_FILES - specifies if attached (Project) files must be saved to project

Return

Returns TRUE if successful and FALSE otherwise.

Examples

EX1

// Save the active folder and subfolders and include any files in the Project folder
void Folder_SaveAsProject_Ex1()
{
    Folder fldSave = Project.ActiveFolder();
    string strPath = GetAppPath(1) + "OriginC\\abc.opj"; // '.opj' is optional
    bool bOK = fldSave.SaveAsProject(strPath, SFC_INCLUDE_SUBFOLDERS | SFC_INCLUDE_ATTACHED_FILES);
    out_int("bOK = ", bOK);
}

Remark

Save a folder as an Origin project file

See Also

Header to Include

origin.h