Page

Name

Page

Remark

The Page class provides methods and properties common to all internal Origin pages that contain one or more layers (all Origin windows except Note windows). The Page class contains a collection of all layers in the page.

An Origin C Page object is a wrapper object that is a reference to an internal Origin page object. Origin C wrapper objects do not actually exist in Origin and merely refer to the internal Origin object. Consequently, multiple Origin C wrapper objects can refer to the same internal Origin object. The Page class is derived from the PageBase and OriginObject classes from which it inherits methods and properties.

Origin project files (files of type *.OPJ) contain collections of pages (windows) of different types. Within Origin project files, windows can be further arranged in Project Explorer folders accessed using the Folder class. The Page class is derived into the GraphPage, WorksheetPage, MatrixPage, and LayoutPage classes (window types containing layers). Use collections of different page types in the Project or Folder class like the Pages or GraphPages collections to locate and access pages in Origin. Once accessed, the Page derived classes can be used to locate and access layers within the page (i.e. use the Layers collection of the Page class or the GraphLayers collection of the GraphPage class) which can in turn be used to access such things as DataPlots and GraphicObjects in the layer.

Hierarchy

Examples

EX1

void Page_ex1()
{
    Page pg;
    pg = (Page) Project.Pages(); // Get the project's active page, cast from PageBase to Page
    if( pg.IsValid() )
        printf("Active page %s is of type %d\n", pg.GetName(), pg.GetType());
    else
        printf("Active page is invalid\n");
}

header to Include

origin.h

Reference

Members

Name Brief Example
AddLayer Add a new Layer to the page giving it the specified name. Examples
AddLayers Copies All layers in pageToCopyFrom (Not implemented for matrix) Examples
ClearModified Mark the page as not modified. Examples
Clone Clone the current page. Examples
Create Create a new page using the supplied template. Examples
FindCursors Find all cursors on the page. Cursors can be parked or attached to a data plot Examples
GetSelectedLayers To get layer/sheets selection Examples
IsModified check if page was changed. Examples
LT_execute Execute a LabTalk script temporarily setting this page as the active page. Examples
LT_evaluate Evaluate a LabTalk script temporarily setting this page as the active page. Examples
LT_get_var Get LabTalk variable value temporarily setting this page as the active page. Examples
LT_set_var Set LabTalk variable value temporarily setting this page as the active page. Examples
LT_get_str Get LabTalk string temporarily setting this page as the active page. Examples
LT_set_str Set LabTalk string variable temporarily setting this page as the active page. Examples
Page Constructor a Page object. Examples
Refresh Refresh the page. Examples
Reorder Change the order of the current or specified layer. Examples
SetFlag Set or clear an internal flag. Examples
TestFlag Test an internal flag. Examples

Property

Name Brief Example
Layers A Collection of all Layers in a page. Examples