dpRename()

The function renames a data point.

Synopsis

int dpRename(string oldName, string newName);

Parameter

Parameter Meaning
oldName The old data point name.
newName The new data point name.

Return value

The function returns 0 if it was executed successfully and -1 in the event of an error.

Errors

Errors can be retrieved with getLastError().

Description

The function renames a data point. Refer to nameCheck() for not permitted characters.

Read also the chapter Rename Data points. Note the limitations of the chapter when renaming data points.

If a data point does not contain any sub elements, the data point element is the data point and you can rename the data point directly via the element.
Anmerkung:

Currently all historic queries (dpGetPeriod, alertGetPeriod, dpGetAsynch, dpQuery) are performed using data point names and not IDs. When a data point is renamed, it's history is no longer accessible for NGA projects.

Example

Renames the data point "ExampleDP_Arg2" to ExampleDP_Arg2_new.

 main()
  {
     dpRename("ExampleDP_Arg2", "ExampleDP_Arg2_new");
  }

Assignment

Data point function

Availability

UI