dOPC Client Toolkit Help file
TdOPCGUI.Find Method
C++
public: __fastcall TdGUIItem Find(
    tdOPCControl Control, 
    AnsiString Name, 
    AnsiString PropName, 
    AnsiString OPCGroup, 
    AnsiString OPCItem
);
C#
public TdGUIItem Find(
    tdOPCControl Control, 
    ref String Name, 
    ref String PropName, 
    ref String OPCGroup, 
    ref String OPCItem
);
Visual Basic
Public Function Find(
    Control As tdOPCControl, 
    ByRef Name As String, 
    ByRef PropName As String, 
    ByRef OPCGroup As String, 
    ByRef OPCItem As String
) As TdGUIItem

search for Control and returns the name and Propertyname of the Control and the assigned OPCItemId and GroupName 

Find searches the passed control and fills the passed Name, PropName, OPCGroup and OPCItem assigned to the control and returns the TdGUIItem if found, otherwise nil.

procedure TForm1.Button1Click(Sender: TObject);
var
  Name,
  ControlName,
  Propname,
  OPCGroup,
  ItemName: string;
  GUIItem : TdGUIItem;
  OPCItem : TdOPCItem;
begin
  GUIItem := dOPCGUI.Find(Edit1,ControlName,Propname,OPCGroup,ItemName);
  if GUIItem <> nil then
  begin
    ShowMessage(ControlName+#10#13+Propname+#10#13+OPCGroup+#10#13+ItemName);
    OPCItem := FinddOPCItem(OPCServer,OPCGroup,ItemName);
    if OPCItem <> nil then
      OPCItem.WriteSync('Hello');
  end
  else
    showMessage('not found');
end;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.