2.25.3 Copy


Description

Syntax

VB: Function Copy([ r1 As ByVal Object ], [ c1 As ByVal Object ], [ r2 As ByVal Object ], [ c2 As ByVal Object ] ) As Boolean
C++: bool Copy(_variant_t r1, _variant_t c1, _variant_t r2, _variant_t c2 )
C#: bool Copy(var r1, var c1, var r2, var c2 )

Parameters

r1
Zero based index of first row to copy.
c1
Zero based index of first column to copy.
r2
Zero based index of last row to copy.
c2
Zero based index of last column to copy.

Return

Remark

Examples

VB

    Sub CopyData()
        'assume there exist a matrixsheet with data
        Dim app As Origin.ApplicationSI
        Dim mtxPage As Origin.MatrixPage
        Dim mtxSheet As Origin.MatrixSheet
        Dim mtxObj As Origin.MatrixObject

        app = New Origin.ApplicationSI
        mtxPage = app.MatrixPages(0) 'get the first matrixpage in current project
        mtxSheet = mtxPage.Layers(-1) 'get active matrixsheet
        mtxObj = mtxSheet.MatrixObjects(-1) 'get active matrixobject

        Dim bSuccess As Boolean
        bSuccess = mtxObj.Copy(0, 0, -1, -1) 'copy all data to clipboard
    End Sub

Version Information

8.0SR2

See Also