2.14.2.25 pe_save

Brief Information

Save contents of Project Explorer subfolder as an Origin project file

Command Line Usage

1. pe_save fname:=mywork.opj;

2. fname$="mywork.opj"; pe_save path:=/Folder1;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Target project file name fname

Input

string

fname$
The full file name and path of the project file name
Path of the folder to save path

Input

string

The path of the folder, in the current project, to save.
Save subfolder too? sub

Input

int

1
Option to save all the subfolders too.
Save attached files too? proj

Input

int

0
Option to save all the attached files too.
Integer that receives the error code. err

Output

int

<unassigned>
An integer variable that receives the error code.

Description

Save a folder from the current project to an Origin project file

Examples

Find where [Book1] is in your project, rename the folder and export as a seperate opj.

string strPath$;
pe_path page:=Book1 path:=strPath$ active:=1;    // Search where [Book1] is
pe_cd path:="../";   // Go back one level
pe_rename old:=strPath.GetToken(strPath.GetNumTokens('/')-1, '/')$ newname:=Export;    // rename the folder
pe_move move:=Export path:=/;    // Move the folder to the root
pe_save fname:="D:\MyNewOpj.opj" path:=/Export;   // Save the folder as a seperate opj
pe_rmdir folder:=/Export folpromt:=0 pgpromt:=0;    // Delete the folder without prompt

Related X-Functions

pe_mkdir, pe_path , pe_rename, pe_move, pe_rmdir


Keywords:OPJ, OPJU