3.2.6 CreatePage

Description

Create new page (workbook, graph, matrixbook, Notes .etc) in Origin project.

Syntax

CreatePage
(nType, 
PageName = "", 
TemplateName  = "", 
nOption = CREATE_VISIBLE_SAME)

Parameters

nType
3: PGTYPE_GRAPH
11: PGTYPE_LAYOUT
5: PGTYPE_MATRIX
9: PGTYPE_NOTES
2: PGTYPE_WKS
PageName
Specifies the page name
TemplateName
Specifies the page name
nOption
CREATE_VISIBLE_SAME

Return

The new created page.

Examples

Ex1:

import PyOrigin
NewBook= PyOrigin.CreatePage(2, 'NewBook','Origin',1)
print('new workbook created')
NewGraph= PyOrigin.CreatePage(3,'NewGraph','Origin',1)
print('new graph created')

Ex2:

#You can also use the page type in this way
import PyOrigin
NewBook= PyOrigin.CreatePage(PyOrigin.PGTYPE_WKS, 'NewBook','Origin',1)
print('new workbook created')
NewGraph= PyOrigin.CreatePage(PyOrigin.PGTYPE_GRAPH, 'NewGraph','Origin',1)
print('new graph created')