AddCopy

From OriginLab Wiki

(Difference between revisions)(Link to this page as [[OriginCOM:Layers-AddCopy]])
Jump to: navigation, search
Revision as of 07:08, 22 June 2008 (edit)
Uploader (Talk | contribs)
(New page: {{DISPLAYTITLE:AddCopy}} ==Description== ==Syntax== <code><pre> VB: Function AddCopy(Layer As Layer, [ Options As ByVal Object ] ) As Layer </pre></code> <code><pre> C++: Layer AddCopy(...)
← Previous diff
Revision as of 10:01, 20 August 2008 (edit) (undo)
Uploader (Talk | contribs)

Next diff →
Line 1: Line 1:
{{DISPLAYTITLE:AddCopy}} {{DISPLAYTITLE:AddCopy}}
 +[[category:PM]]
==Description== ==Description==
Line 9: Line 10:
</pre></code> </pre></code>
<code><pre> <code><pre>
-C++: Layer AddCopy(Layer Layer, Variant Options )+C++: Layer AddCopy(Layer Layer, _variant_t Options )
</pre></code> </pre></code>
<code><pre> <code><pre>
-C#: Layer AddCopy(Layer Layer, Variant Options )+C#: Layer AddCopy(Layer Layer, var Options )
</pre></code> </pre></code>

Revision as of 10:01, 20 August 2008


Contents

Description

Syntax

VB: Function AddCopy(Layer As Layer, [ Options As ByVal Object ] ) As Layer
C++: Layer AddCopy(Layer Layer, _variant_t Options )
C#: Layer AddCopy(Layer Layer, var Options )

Return

Remark

Examples

Dim oApp As Origin.ApplicationSI

Dim myGraphPage As Origin.GraphPage

Dim myGraphPage2 As Origin.GraphPage

Dim myGraphLayer As Origin.Layer

Dim myGraphLayer2 As Origin.Layer

Set oApp = GetObject("", "Origin.ApplicationSI")

oApp.Execute ("doc -mc 1")

'we can create a opj file, this including a graph with two layers
oApp.Load ("c:\\graph.opj")


Const ORIGIN_WINTYPE_GRAPH = 3

Dim name As String, realname As String

'get the second layer
Set myGraphLayer = oApp.GraphPages(0).Layers(1)

'create a new GraphPage
realname = oApp.CreatePage(ORIGIN_WINTYPE_GRAPH, "MyWorksheet2", "Origin")

'get the second GraphPage
Set myGraphPage2 = oApp.GraphPages(1)

'Add and Copy the my GraphLayer
Set myGraphLayer2 = myGraphPage2.Layers.AddCopy(myGraphLayer)

Version Information

8.0SR2

See Also