dpGetAlias()

New consistent name for the function dpNameToAlias. The function dpGetAlias() returns the alias for the specified datapoint element.

Synopsis

string | dyn_string dpGetAlias(string dpName | dyn_string dpName);

Parameter

Parameter Meaning
dpName datapoint element name

Return Value

The return value is the appropriate alias in the language or " " in the event of errors.

Note that the alias can be only unilingual. The return value of dpGetAlias() is so the alias in the configuration language.

Errors

The errors can be retrieved with getLastError(). This includes missing or incorrect arguments.

Description

This function returns the alias of the given datapoint element. An alias request is only possible for DPEs (not for nodes).

Example


main()
{
  string alias;
  alias = dpGetAlias("Pump12."); // returns alias
}

Example


main()
{
  dyn_string alias;
  DebugN(dpNames("*ExampleDP_*.:"));
  //DebugN(dpGetAlias(dpNames("ExampleDP_Arg1.:")));
  alias = dpGetAlias(dpNames("*ExampleDP_*.:"));
  // returns all aliases
  DebugN(alias);
}

Assignment

Datapoint function

Availability

CTRL