AnnGetObjectFromTag example for Delphi
procedure TForm1.Button1Click(Sender: TObject);
var
hObject: L_HANDLE;
hTag: longint;
Msg: String;
begin
ShowMessage ('I Will Looking For an Object With Tag = 1');
LEADAnn1.EnableMethodErrors:= False;
hObject:= LEADAnn1.AnnGetObjectFromTag(LEADAnn1.AnnContainer, 1, false);
if ( hObject <> 0 ) then
begin
hTag:= LEADAnn1.AnnGetTag (hObject);
Msg:= 'There Is an Object With Tag= ' + IntToStr(hTag);
ShowMessage(Msg);
end
else
ShowMessage ('No Object Contain Tag = 1') ;
LEADAnn1.EnableMethodErrors:= True;
end;