8.2.2 ActiveLayer

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

Get the active Layer object in the project. The active Layer object corresponds to the active layer in the active window (graph, worksheet, matrix, or layout)

Syntax

ActiveLayer()

Parameters

Return

The active Layer.

Examples

#With graph active
import PyOrigin
Layer=PyOrigin.ActiveLayer()
#Reset the layer name and prthe new name
Layer.SetName('RightY')
NewName=Layer.GetName()
print('The new name for layer is %s' % (NewName))