OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

pe_path

Contents

Brief Information

Find Project Explorer path

Additional Information

Updated in Origin 8.1 SR2

Command Line Usage

  1. pe_path page:=book1 path:=strPath;
  2. pe_path page:=myFolder type:=folder active:=1;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Name of page or folder page

Input

string

Name of the window/subfolder to be searched for.
Path path

Input/Output

string

<optional>
If type is window, this variable outputs the path of the specified window. If type is folder, this variable can be both input and output. As input, it specifies the which folder's subfolder to be searched for. As output, it is the path of the specified subfolder. When it is input and empty, it refers to the current active folder.
Target Type type

Input

int

0
Specify the type of the target to be searched for, window or subfolder.

Option list:

  • window:Page Short Name
    Search for a window.
  • folder:Subfolder Name
    Search for a subfolder.
Activate Target active

Input

int

0
Specify whether or not to activate the target when it is found.

Description

This X-Function is used to get the path of the specified window or subfolder in the Project Explorer. If no name of window or subfolder is specified, the current path will be returned. An optional string variable can be used to retrieve the path. Also, you can specify a path from which to find subfolder. When this path variable is not specified, result will be printed out. It also provides option for whether or not to activate the searched target when the target is found.

Examples

This example will show how to find an existing workbook in the project.

  1. Open the project <Origin Installation Directory>\Samples\LabTalk Script Examples\Loop_wks.opj.
  2. Activate the root folder Loop_wks.
    Image:Pe_path_example_1.png
  3. Run pe_path -d; in Command Window to open the pe_path dialog. The Name of page or folder is S1Freq1, and the result path will hold by strPath variable. Check the Activate Target check-box.
    Image:Pe_path_example_2.png
  4. After clicking the OK button, the workbook named S1Freq1 is active.
    Image:Pe_path_example_3.png
  5. Enter the script strPath$ = ; in Command Window, then the path of S1Freq1 workbook in the Project Explorer will be output to the Command Window.
    Image:Pe_path_example_4.png