Add an matrixobject of the matrixsheet to datarange
VB: Function AddMatrix(matrix As MatrixSheet, Index As ByVal Integer ) As Integer
C++: int AddMatrix(MatrixSheet matrix, int Index )
C#: int AddMatrix(MatrixSheet matrix, int Index )
Sub AddMatrix() Dim app As Origin.ApplicationSI Dim dr As Origin.DataRange Dim mtx As Origin.MatrixSheet app = New Origin.ApplicationSI mtx = app.FindMatrixSheet("") 'get active matrixsheet If mtx Is Nothing Then MsgBox("Can not get an active matrixsheet") Exit Sub End If dr = app.NewDataRange() 'add a project datarange dr.AddMatrix(mtx, 0) 'add matrix' first matrixobject to datarange Dim data(0 To 9) As Double For ii = 0 To 9 data(ii) = ii + 100 Next dr.SetData(Data) End Sub
8.0SR2