acGetRefACType()

Returns a AC type name, if the leaf dpeName is referenced to an AC type, otherwise an empty string.

Synopsis

string acGetRefACType(string dpeName, string &refType);

Parameters

Parameter Meaning
dpeName Data point element, to be checked (for example, _mp_COUNTER1.counter)1
refType The according AC type (for example, COUNTER_SUB)

Return Value

The AC type name or an empty string.

Errors

-

Description

Returns a AC-type name, if the leaf dpeName is referenced to an AC type, otherwise an empty string. The check starts from the last leaf, and stops at the first leaf where a AC type is referenced.

Example

In a text field the data point element is given and a button checks with the following script if there exists an AC type and returns the name of the AC type in a selection list.

main()
{
  int value;
  value = abs(-56412);
  //Setzt 'value' auf den Wert 56412
  string name, acType;
  name = TextField1.text;
  acGetRefACType(name, acType);
  DebugN("DP: ",name);
  DebugN("AC-DPT: ",acType);
  if(acType == "")
  SelectionList1.appendItem = "empty";
  else
  SelectionList1.appendItem = acType;
}
main()
{
  string name, acType;
  name = TextField1.text;
  acGetRefACType(name, acType);
  DebugN("DP: ",name);
  DebugN("AC-DPT: ",acType);
  if(acType == "")
    SelectionList1.appendItem = "empty";
  else
    SelectionList1.appendItem = acType;
}

Assignment

Data point function

Availability

CTRL