OriginPro
 
Loading...
Searching...
No Matches
originpro.pe Namespace Reference

Classes

class  Folder
 

Functions

def search (name='', kind=0)
 
def cd (path=None)
 
def mkdir (path, chk=False)
 
def move (name, path)
 
def active_folder ()
 
def root_folder ()
 

Detailed Description

originpro
A package for interacting with Origin software via Python.
Copyright (c) 2020 OriginLab Corporation

Function Documentation

◆ active_folder()

def originpro.pe.active_folder ( )
Active Folder in Project Explorer
Parameters:
    none
Returns:
   Folder Objects
Examples:
    fd=op.pe.active_folder()

◆ cd()

def originpro.pe.cd (   path = None)
Change Project Explorer directory
Parameters:
    path (str): Path of the directory to move into
Returns:
    Current path
Examples:
    path=op.pe.search('Graph1',0)
    op.pe.cd(path)

◆ mkdir()

def originpro.pe.mkdir (   path,
  chk = False 
)
Create new folder in Project Explorer
Parameters:
    path (str): Name of the path to be created; if folder already exists and chk is False, then it is enumerated, but if chk is True, then will not create new
    chk (bool): Specify if check folder exists or not. If set to True, then will not force create enumerated new one if already existed
Returns:
    Path created
Examples:
    path=op.pe.search('Graph1',0)
    op.pe.cd(path)
    op.pe.mkdir('Folder2', True)

◆ move()

def originpro.pe.move (   name,
  path 
)
Move page or folder to specified folder in Project Explorer
Parameters:
    name (str): Name of the existing page or folder
    path (str): path of the location where the page should be moved to
Returns:
    None
Examples:
    path=op.pe.search('Graph1',0)
    op.pe.cd(path)
    op.pe.mkdir('Folder2', True)
    op.pe.move('Folder2','/UNTITLED/')

◆ root_folder()

def originpro.pe.root_folder ( )
Root Folder in Project Explorer
Parameters:
    none
Returns:
   Page Objects
Examples:
    fd=op.pe.root_folder()

◆ search()

def originpro.pe.search (   name = '',
  kind = 0 
)
Get current Project Explorer path or path of specified window
Parameters:
    name (str): Name of the page/folder to be searched for
    kind (int): Page Short Name if 0, Subfolder Name if 1
Returns:
    Current path if page/folder is empty, or path where page/folder is located
Examples:
    op.pe.search('Graph1',0)