InsertUID Example for Delphi
var
nRet: Integer;
ItemX: TListItem;
begin
LEADDicomDS1.EnableMethodErrors:= False;
nRet:= LEADDicomDS1.FindUID ('1.2.840.10008.1.3');
if(nRet = 0)then
begin
ShowMessage('Already Exists!');
Exit;
end;
LEADDicomDS1.EnableMethodErrors:= True;
nRet:= LEADDicomDS1.InsertUID('1.2.840.10008.1.3', 'My Test UID', DICOM_UID_TYPE_OTHER);
if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
//add item to the ListView control
ItemX:= ListView1.Items.Add();
ItemX.Caption:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Code;
ItemX.SubItems[1]:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
ListView1.Selected:= ItemX;
ListView1.Refresh();
ListView1.SetFocus();
LEADDicomDS1.EnableMethodErrors:= True;
end;