cnsGetNodesByData

Looks for nodes that are linked to the given data point (element).

Synopsis

bool cnsGetNodesByData(string dp, int type, [string view], dyn_string &cnsPath);

Parameters

Parameter Description
dp The name of the data point (element). If an empty string is defined, only nodes that are not linked to a data point are returned.
type Limits the result to nodes with the given CNSDataIdentifier.
view Limits the result to the given path
cnsPaths Receives the ID paths of the nodes

Return value

Returns TRUE if successful or FALSE in case of an error.

Errors

Possible errors:

  • Datenpunkt oder Pfad existiert nicht

Description

This function searches for node that are linked to the given data point (element). Moreover, it is possible to define type and view filters.

main()
{
  dyn_string cnsPath;
  cnsGetNodesByData("MyExampleDp.", CNS_SEARCH_ALL_TYPES, "System1.View1:", cnsPath));
  DebugN(cnsPath);
}

Availability

UI, CTRL