dOPC Client Toolkit Help file
Example
procedure AddItems(G: TdOPCGroup; ItemNames: TStrings);
var
 IL   : TdOPCItemList;
 Item : TdOPCItem;
 i    : Integer;
begin
  IL := TdOPCItemList.create;
  for i := 0 to ItemNames.Count-1 do
  begin
    Item := TdOPCItem(G.OPCItems.Add);
    Item.ItemID := ItemNames[i];
    IL.Add(Item);
  end;
  G.OPCItems.OPCAddItems(IL);
  for i := 0 to IL.Count-1 do
    if IL[i].LastError <> S_OK then
      Beep;
  IL.Free;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  Itemlist: TStringlist;
  MyGroup : tdOPCGroup;
begin
  Itemlist := TStringlist.Create;
  Itemlist.Add('Random.String');
  Itemlist.Add('Random.Int1');
  Itemlist.Add('Random.NoExists');
  MyGroup := dOPCServer1.OPCGroups.Add('MyGroup');
  AddItems(MyGroup, Itemlist);
  Itemlist.Free;
end;
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.