InsertDS Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'LEADDICOM2 is a DICOM Dataset defined outside this method
Private Sub TestInsertDS ( )

   'find the first PATIENT KEY, copy it to a new 'DS, and then save it to a file
   LEADDICOM1.FindFirstKey("PATIENT", False)
   LEADDICOM2.ResetDS()
   LEADDICOM2.InsertDS(LEADDICOM1.hDicomDS, LEADDICOM1.CurrentElement.hElement)
   LEADDICOM2.SaveDS("d:\temp\save.dic", 0)
End Sub