Contents Previous Next Subchapters

Loading Data from the COM Server to an O-Matrix Variable
Syntax status = OMServer.PutMatrix(omVarName)
See Also computdata , computvariant

Description
Transfers the matrix stored in the COM server from a previous call to PutData to O-Matrix as the variable omVarName. The argument omVarName must be a string value that is a valid O-Matrix identifier. If the variable omVarName is active in the currently connected O-Matrix, it will be overwritten by this function call. All data transmitted to O-Matrix are transferred as double-precision scalars, vectors or two-dimensional matrices. For client environments that do not support numeric COM data, see the OMServer.PutVariant method.

The returned value status is an integer OM Server Status code. This value will equal 1 if this function succeeded.

Example
This example continues the sample given in the PutData example.

Public OM As New OMServer

Sub Main()
    Dim status As Integer
    Dim omData(1, 2) As Double
    Dim ix As Integer
    Dim jx As Integer
    
    For ix = 0 To 1
        For jx = 0 To 2
            omData(ix, jx) = ix + jx
        Next jx
    Next ix
    
    status = OM.Open
    If status <> 1 Then
        MsgBox ("Unable to establish connection to O-Matrix")
    End If
    
    status = OM.PutData(6, omData(0, 0), 2, 3)
    If status <> 1 Then
        MsgBox ("Unable to transfer data to O-Matrix")
    End If
    
    status = OM.PutMatrix("omData")
    If status <> 1 Then
        MsgBox ("Unable to transfer matrix to O-Matrix")
    End If
    
End Sub



You can verify that the data was transferred by entering
omData
in the O-Matrix command line. Note that data are transferred to O-Matrix in column-major order.