GetConvertValue Example for VB.NET
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text5" of type "TextBox" from ".NET Framework".
Private Sub TestGetConvertValue()
Dim nRet As Short
Dim lCount As Integer
Dim x As Integer
'add some values to the element
'note, this will only work for elements that have a VR that supports multiple values
LEADDICOM1.EnableMethodErrors = False
LEADDICOM1.StringValueCount = 3
LEADDICOM1.StringValues(0) = CStr(3.45)
LEADDICOM1.StringValues(1) = CStr(9.99)
LEADDICOM1.StringValues(2) = CStr(1.11)
nRet = LEADDICOM1.SetConvertValue 'free the current values
LEADDICOM1.StringValueCount = 0
'now get the values and display them
nRet = LEADDICOM1.GetConvertValue()
If (nRet = 0) Then
lCount = LEADDICOM1.StringValueCount
Text5.Text = ""
For x = 0 To lCount - 1
'display each value on a separate line
Text5.Text = Text5.Text & LEADDICOM1.StringValues(x) & Chr(13) & Chr(10)
Next x
End If
LEADDICOM1.EnableMethodErrors = True
End Sub