2.2.4.38 Project


Contents

Name

Project

Remark

The Project class provides methods and properties to access many of the objects contained in an Origin project file. The Project class includes collections of all different page types and collections of loose datasets (datasets not in a worksheet column) and of all datasets in the Origin Project file. Several methods to get active objects in the Origin project file (such as ActiveCurve, ActiveLayer, and ActiveFolder) and a RootFolder property are also available.

An Origin C Project object is a wrapper object that is a reference to an internal Origin project object. Origin C wrapper objects do not actually exist in Origin and merely refer to the internal Origin object. Only one project file at a time can be open in Origin consequently all Origin C Project objects refer to the same currently open project file.

Hierarchy

Examples

EX1

int Project_ex1()
{
    // Count the number of layers in all graphs in project
    int nCount = 0;
    foreach(GraphPage gp in Project.GraphPages)
    {
        foreach(GraphLayer gl in gp.Layers)
        {
            nCount++;
        }
    }
    out_int("Number of GraphLayers = ", nCount);
    out_str(""); // Another blank line 
    return 0;
}

Header to Include

origin.h

Reference

Members

Name Brief Example
Set the project's active folder. Specified path can be relative or absolute and is not case sensitive.
Get the active Curve which is in the active layer of the active page(window).
The Active CurveBase in the active layer of the active page(window)
Gets the active folder in the project.
It returns the active Layer object. The active Layer object corresponds to the

active layer in the active window (graph, worksheet, matrix, or layout).

Add a datarange object to project that can be stored for later usage
Adds a Tree Object to a serializable Internal Tree Manager
Attaches a file to the Project folder in Origin-C workspace. These files eventually gets saved with the project (.opj) file.
Mark the active project as not modified. This is usually done before exiting

or before loading another project in order to avoid the prompt asking the user to save it.

Compile a source file
Create an object of a registered type class
Remove an operation from project
Deletes the tree referred to by name, lpcszName
Find an object of a registered type class [in the specified file and compile and link it as needed]

[and can optionally compile and link dependent file] Consecutive calls made to FindClass returns a reference to the same object

Find a function in the specified file and compile and link it as needed.
Find a Page object by name, can be short name or long name.
Gets a list of file names that is attached to the Project folder in Origin-C workspace.
It provides all the columns (by names or prefixes) that are common between the worksheets whose names are supplied.

If only one worksheet is supplied, all its columns are returned.

Creates a DataObject& from DataObject name.

Can be used to get a DateObject& from related DataObject name(Example2).

Get a datarange that has been added to project
Get Dataset information
Get dataset mask info
find all the graphing layers where the named dataset is used to construct a plot
Get Drag-and-Drop information for the last dropped file..
Find the folder that contains the page with the given name, and return the folder.
It retrieves the list of all string LabTalk variables.
It retrieves the list of all numeric LabTalk variables.
Gets the name of the project.
Access current evaluation of function object.
Retrieves Origin object given the object unique ID
Get operation object from specified object
Gets the path of the file corresponding to the project. If the project has never been saved

before, the path will be empty.

Given a plot type, like IDM_PLOT_LINE, return an array of integers containing all possible column plot designations.
Given a plot id, like ID_PLOT_DOUBLEY, return the internal plot type like IDM_PLOT_LINE.
Get internal profiling info
Find the report tree in the project given its corresponding UID
Access storage areas.
Get names of storage class objects
Get the Tree if available in the manager
Retrieves the names of the Trees in the manager
Test if the active project has been modified since the last saving or loading.
Check a control window to see if it is currently shown.

Origin's control windows are those that you can access from the View menu, like Project Explorer, Script Window etc.

management function for multiple OPJ support
Create a new operation will specified class name
Open a new project, or append a project. Current project will be closed and replace with the new one if successful
It appends the string to the Results Log.
Default constructor.
Turns on or off the registration of updates made to the document


Removes all the files from the Project folder in Origin-C workspace.


Removes a file from the Project folder in Origin-C workspace.


Remove one datarange from project with specified name or the object
Loop over all wks and matrix and call its Reset method.
Do the same as LabTalk: run -p au; wait for autoupdate to finish
Save the active project.
Set dataset mask info
Show/Hide the sepcified control window.
Undo the last block.
Begin undo block. After this call any undoable action belongs to the same block.

Do not call it directly, use UndoBlock class instead.

End undo block.

Do not call it directly, use UndoBlock class instead.

Gets current undo block identifier (ID).
Undo the block identified by specified ID.

Property

Name Brief Example
Collection of names of all Origin datasets.
Collection of all the graph pages in the project.
Collection of all the layout pages in the project.
Collection of names of all loose Origin datasets.
Collection of all the matrix pages in the project.
Collection of all the note pages in the project.
Collection of all the operations in the project.
Collection of all the pages in the project.
the root folder of the project.
Collection of all the worksheet pages in the project.