dpGetId()

Returns the data point ID and the element ID of the defined data point.

Synopsis

bool dpGetId(string dpName, unsigned &dpId; int &elId);

Parameters

Parameter Description
dpName Namer of data point (without wildcards, resolution to ":", no system name).
dpId Data point ID.
elId Data point element ID.

Return Value

Non existing DPEs returns "false";, otherwise "true"; for OK is returned. With "false"; the content of dpId and elId are undefined.

Errors

The errors can be retrieved with getLastError(). This includes missing arguments or when the data point does not exist.

Description

Returns the data point ID and the element ID of the defined data point.

Example

main()
{
  unsigned id1;
  int id2;
  bool x;
  x = dpGetId("ExampleDP_Arg1.", id1, id2);
  DebugN(x, id1, id2); // returns true [1] and [1421] [1]
}

Assignment

Data point function

Availability

CTRL