GetFloatValue Example for Visual Basic
Private Sub TestProc5()
Dim lCount As Long
Dim x As Long
Dim nRet As Integer
LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement
'insert a new element for the Float Values
LEADDICOM1.InsertElement False, TAG_TABLE_OF_PARAMETER_VALUES, VR_FL, False, 0
Text1.Visible = True
Text1.Text = ""
'insert some float values into the element
LEADDICOM1.FloatValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.FloatValues(x) = x * 1.99
Next
'set the floats
nRet = LEADDICOM1.SetFloatValue(5)
If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
LEADDICOM1.FloatValueCount = 0 'free the values
Text1.Visible = True
Text1.Text = ""
'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"
'get the values
nRet = LEADDICOM1.GetFloatValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.FloatValueCount - 1
'display each value separated by a " X "
Text1.Text = Text1.Text & " X " & CStr(LEADDICOM1.FloatValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
MsgBox "wait"
End Sub