CreatePage
|
It is recommended that you switch to the originpro package. PyOrigin is primarily for users who need to work with Origin version prior to 2021.
|
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')
|