|
Contents | Previous | Next | Subchapters |
| Syntax |
status = OMServer.PutData(arraySize,dataSrc,NRows,NCols) |
| See Also | computmatrix |
The returned value status is an integer
OM Server Status
code. This value will equal 1
if this function succeeded.
Public OM As New OMServer
Sub Main()
Dim status As Integer
Dim omData(5) As Double
Dim ix As Integer
For ix = 0 To 5
omData(ix) = ix
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), 2, 3)
If status <> 1 Then
MsgBox ("Unable to transfer data to O-Matrix")
End If
End Sub
Press the F5 key to run the example.
This example creates a 6-element array, omData and
passes this variable to O-Matrix as 2 row by 3 column matrix.
You can verify that the data is available in O-Matrix by
entering
omlink("get")
at the command line in O-Matrix. This will display the
following result in the Command output window
{
[ 0 , 2 , 4 ]
[ 1 , 3 , 5 ]
}
Practical applications will typically call the
PutMatrix
immediately after calling the PutData function.