dpSetComment()

Synopsis

int dpSetComment(string dp, langString comment);

Parameters

Parameter Meaning
dp data point element to be commented on
comment comment (in one or several languages)

Return Value

If successful 0, otherwise -1.

Errors

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

Description

New consistent name for the function setDpComment(). The function dpSetComment() sets a comment for the data point element dp. This comment can be retrieved with the help of the function dpGetComment(). Comments are not archived historically. Comments which have been replaced can therefore no longer be retrieved!

Example

A new data point is created, a comment is written and then read out again for checking.

main()
{
  dpCreate("number_1","ExampleDP_Int"); // new DP
  dpSetComment("number_1.","Here is the comment");
  DebugN(dpGetComment("number_1."));//output in the log viewer
}

The following example sets a comment in two languages (a multilingual project with two languages) ("Riesenrad") German and ("EmpireStateBuilding") English.

main()
{
  langString descr;
  setLangString(descr,0,"Riesenrad");
  setLangString(descr,1,"EmpireStateBuilding");
  dpSetComment("integer_1.",descr); 
}

Assignment

Data point function, waiting Control function

Availability

CTRL