I have used Group and elements series as follows..
The code is here
Dim tag1 As DicomTag = DicomTagTable.Instance.Insert(1048645, &HFFFFFFFFL, "System0", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048646, &HFFFFFFFFL, "System1", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048647, &HFFFFFFFFL, "System2", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048648, &HFFFFFFFFL, "System3", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048649, &HFFFFFFFFL, "System4", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048650, &HFFFFFFFFL, "System5", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048651, &HFFFFFFFFL, "System6", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048652, &HFFFFFFFFL, "System7", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048653, &HFFFFFFFFL, "System8", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048654, &HFFFFFFFFL, "System9", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048655, &HFFFFFFFFL, "System10", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048656, &HFFFFFFFFL, "System11", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048657, &HFFFFFFFFL, "System12", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048658, &HFFFFFFFFL, "System13", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048659, &HFFFFFFFFL, "System14", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048660, &HFFFFFFFFL, "System15", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048661, &HFFFFFFFFL, "System16", DicomVRType.LO, 1, 1, 1)
tag1 = DicomTagTable.Instance.Insert(1048662, &HFFFFFFFFL, "System17", DicomVRType.LO, 1, 1, 1)
ds.Load(filename, DicomDataSetLoadFlags.None)
Dim element As DicomElement
element = DS.InsertElement(Nothing, False, 1048645, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "1", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048646, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "2", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048647, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "3", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048648, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "4", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048649, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "5", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048650, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "6", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048651, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "7", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048652, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "8", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048653, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "9", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048654, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "10", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048655, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "11", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048656, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "12", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048657, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "13", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048658, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "14", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048659, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "15", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048660, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element,"16", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048661, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element,"17", DicomCharacterSetType.Default)
End If
element = DS.InsertElement(Nothing, False, 1048662, DicomVRType.LO, False, 1)
If Not element Is Nothing Then
DS.FreeElementValue(element)
DS.SetStringValue(element, "18", DicomCharacterSetType.Default)
End If
The output is attached...which is wrong ...Please check it and Correct me If I am Wrong....
Thanks
Sakthi