2.29.13 NewDataRange


Description

Create a datarange from a MatrixObject

Syntax

VB: Function NewDataRange([ Index As ByVal Object ] ) As DataRange
C++: DataRange NewDataRange(_variant_t Index )
C#: DataRange NewDataRange(var Index )

Parameters

Return

Remark

Examples

VB

    Sub NewDataRange()
        Dim app As Origin.IOApplication
        Dim msh As Origin.MatrixSheet

        app = New Origin.ApplicationSI
        msh = app.FindMatrixSheet("") 'get active matrixsheet

        If msh Is Nothing Then
            MsgBox("Can not get active matrixsheet")
            Exit Sub
        End If

        Dim dr As Origin.DataRange
        dr = msh.NewDataRange(0) 'new a datarange from the first MatrixObject
        Dim vData(10) As Double
        For ii = 0 To 10
            vData(ii) = ii + 1
        Next
        dr.SetData(vData)
    End Sub

Version Information

8.0SR2

See Also