dOPC Client Toolkit Help file
TdOPCGUI.GetdOPCItem Method
C++
public: __fastcall tdopcItem GetdOPCItem(
    tdOPCControl Control, 
    AnsiString PropName = ''
);
C#
public tdopcItem GetdOPCItem(
    tdOPCControl Control, 
    String PropName
);
Visual Basic
Public Function GetdOPCItem(
    Control As tdOPCControl, 
    PropName As String = ''
) As tdopcItem

get the orginal dOPCItem from dOPCServer 

GetdOPCItem returns the assigned TdOPCItem for the passed control.

If you have only one item assigned to the control, you can omit the PropName parameter.

procedure TForm1.Button1Click(Sender: TObject);
var
  Item : TdOPCItem;
begin
  Item := dOPCGUI1.GetdOPCItem(Edit1); //get OPC item from control
  if item <> nil then //if item assigned
    Item.WriteSync('Hello') //write new value to item
  else
    ShowMessage('no item assigned');
end;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.