dpGetId()

Returns the datapoint ID and the element ID of the defined datapoint.

Synopsis

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

Parameters

Parameter Description
dpName Namer of datapoint (without wildcards, resolution to ":", no system name).
dpId Datapoint ID.
elId Datapoint 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 datapoint does not exist.

Description

Returns the datapoint ID and the element ID of the defined datapoint.

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

Datapoint function

Availability

CTRL