2.22.1 Add


Description

Add a new layer to the layer collection of one page

Syntax

VB: Function Add([ LayerName As ByVal Object ], [ Options As ByVal Object ], [ Template As ByVal Object ], [ Option2 As ByVal Object ], [ Sheet As ByVal Object ] ) As Layer
C++: Layer Add(_variant_t LayerName, _variant_t Options, _variant_t Template, _variant_t Option2, _variant_t Sheet )
C#: Layer Add(var LayerName, var Options, var Template, var Option2, var Sheet )

Parameters

LayerName
--
Options
--
Template
--
Option2
--
Sheet
--

Return

Remark

Examples

VB

    Sub AddLayer()
        Dim app As Origin.IOApplication
        Dim ly As Origin.Layer

        app = New Origin.ApplicationSI
        ly = app.ActivePage.Layers.Add() ' add a new layer on active page(WorksheetPage, GraphPage or MatrixPage)
        MsgBox(ly.Name)
    End Sub

Version Information

8.0SR2

See Also