I’ve been trying to get data from a simple test array in a dataset using the Range command. Using the ‘Transferring Large Data Sets Section by Section’ example as a guide I made the following procedure:
Private Sub CommandButton2_Click()
Dim TmpArr(1 To 3) As Single
TmpArr(1) = 2
TmpArr(2) = 3
TmpArr(3) = 4
With ActiveDatabase.RootFolder.Add("Signal", fpObjectTypeDataSet)
.DataStructure = fpDataStructureDataSeries
.DataType(fpDataComponentAll) = fpDataTypeFloat32
.NumberOfRows = 3
.FillColumns "(NumberOfRows(i), FloatingPoint32 0, FloatingPoint32 0)", fpDataComponentAll
.Update
End With
ActiveDatabase.RootFolder.Object("Signal").Range(fpDataComponentAll).Value = TmpArr
End Sub
This routing crashes at the Range statement with an ‘Invalid procedure or argument’ error. What am I doing wrong?
Also, if this is all working, I would like to transfer data from a multidimensional array (50 columns) in 50 individual datasets. Is it possible to do this using the Range statement. In other words, how do I select 1 column in the array?