dOPC Client Toolkit Help file
Example
procedure TForm1.ShowCategoryTree;
var
  i,a,c,sc  : integer;
  Cat       : TdOPCEventitem;
  Condition : TdOPCEventitem;
begin
 if dOPCEventServer1.SelectServer then
 begin
   Memo1.Clear;
   dOPCEventServer1.Active := true;
   for i := 0 to dOPCEventServer1.Categories.Count-1 do //for all Categories
   begin
     Cat := dOPCEventServer1.Categories[i]; //get Category
     Memo1.Lines.Add('Category: '+Cat.Name + ' Eventtype:'+ InttoStr(Cat.IType)); //add to list
     for a := 0 to Cat.Items.Count-1 do //for all properties
       Memo1.Lines.Add('  Attribute: '+Cat.Items[a].Name);
     for c := 0 to doPCEventServer1.Conditions.Count-1 do //for all Conditions
     begin
       Condition := doPCEventServer1.Conditions[c];
       if Condition.IType = Cat.Id then //if type of Category
       begin
         Memo1.Lines.Add('  Condition: '+Condition.Name);
         for sc := 0 to Condition.Items.Count-1 do //for all Subconditions
           Memo1.Lines.Add('Subcondition '+Condition.Items[sc].Name);
       end
     end;
     Memo1.Lines.Add('');
   end;
   dOPCEventServer1.Active := false;
 end;
end;
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.