2.1.6 CopyPage


Description

The CopyPage method replaces the clipboard with an image of the specified graph or layer.

Syntax

VB: Function CopyPage(Name As ByVal String, [ format As ByVal Object ], [ dpi As ByVal Object ], [ colordepth As ByVal Object ] ) As Boolean
C++: bool CopyPage(LPCSTR Name, _variant_t format, _variant_t dpi, _variant_t colordepth )
C#: bool CopyPage(string Name, var format, var dpi, var colordepth )
Python: def CopyPage(self, *args):

Parameters

Name
Name of the page to be copied to clipboard.
format
Image format, defaults to WMF.
WMF, 1: EMF, 2: Bitmap, 3: DIB, 4:OLE Object
dpi
Image resolution in pixels per inch. Only used for Bitmap and DIB, defaults to 150.
colordepth
Color-depth of the exported image. Only used for Bitmap and DIB. Default is 16.

Return

Remark

Examples

VBA

Dim oApp As Origin.ApplicationSI
Set oApp = GetObject("", "Origin.ApplicationSI")
Dim name As String, bb As Boolean
name = "Graph1"
bb = oApp.CopyPage(name)

Python

import OriginExt as O
app = O.Application(); app.Visible = app.MAINWND_SHOW
grPageName = app.CreatePage(app.OPT_GRAPH)
app.CopyPage(grPageName)

Version Information

8.0SR2

See Also