dpGetComment()
Returns the comment for the data point element(s).
Synopsis
langString | dyn_langString dpGetComment(string | dyn_string dp [, int
mode]);
Parameters
Parameter | Meaning |
---|---|
dp | Data point element or data point |
mode | Mode of functionality. See also the description of dpGetDescription(). |
Return Value
Comment in all available languages or empty strings in all languages.
Errors
The errors can be retrieved with getLastError(). This includes missing arguments or when the data point does not exist.
Description
The function dpGetComment() returns the description/descriptions for the data point element or data point dp. The comments can also be set with dpSetComment().
The description is a property of the DPEs and not of the DPs. For a correct request of a DP with one level use: dpGetComment("Valve17."). Essentially is the POINT after 17, which shows, that the request belongs to the first level!
Using DPs with more levels for a request, the example might look like this: dpGetComment("Valve17.value.position"). This example queries the description of the data point element "position".
Example
A new data point is created, a comment is written and read out again.
main()
{
dpCreate("number_1", "ExampleDP_Int");
//New DP
dpSetComment("number_1.", "This is the description");
DebugN(dpGetComment("number_1."));
//Output to the Log Viewer
}
Assignment
Data point function
Availability
UI, CTRL