dpSetAlias()

The function dpSetAlias() sets the alias for the specified data point element.

Synopsis

int dpSetAlias(string dp, string alias);

Parameters

Parameter Meaning
dp Data point element
Alias Alias to be set

Return Value

If successful 0, in case of a wrong/non existent DP -1.

Errors

Errors can be retrieved with getLastError(). An error message is issued in the event of incorrect DPs, missing arguments or an already existing alias!

Description

New consistent name for the function setDpAlias(). The function dpSetAlias() sets the alias for the specified data point element dp. An alias may not contain any characters that may not occur in data point names. These characters are listed in the description of dpCreate().

Note that the alias can be set only unilingual. This means that the alias is always the same for all project languages.

Each alias must be unique, which means that one alias must specify only one data point element and one data point element must only have one alias.

Example

{
  dpSetAlias("Pump12.Command_On", "P12Com_O");
}

Assignment

Data point function, waiting Control functions

Availability

UI, CTRL