Page::Layers

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

Read-only property. Return the layers collection.


Get a layer in layers collection

Syntax

 Layers


 Layers(Index)
 Layers(LayeName)

Parameters

Index
index of the layer
LayerName
LayerName

Return

Layers collection in Page.


The specified layer in Page.

Examples

EX1

import PyOrigin
pg = PyOrigin.ActivePage()
print(pg.Layers.GetCount())

EX2

import PyOrigin
layer=PyOrigin.Pages('Book1').AddLayer('Sheet2')
print(PyOrigin.Pages('Book1').Layers(0).GetName())
print(PyOrigin.Pages('Book1').Layers(1).GetName())

See Also

GetLayers