Create a datarange from a MatrixObject
VB: Function NewDataRange([ Index As ByVal Object ] ) As DataRange
C++: DataRange NewDataRange(_variant_t Index )
C#: DataRange NewDataRange(var Index )
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
8.0SR2