cnsChangeNodeData

Changes the datapoint (element) and type of the given node.

Synopsis

bool cnsChangeNodeData(string cnsPath, string dp [, int type]);

Parameters

Parameter Description
cnsPath ID path of the node
dp Name of the new datapoint (element)
type CNSDataIdentifierType of the node

Return value

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

Errors

-

Description

The function changes the linked datapoint (element) of a node. In order to remove a datapoint it is possible to specify an empty string. If not explicitly defined, either CNS_DATATYPE_EMPTY (in case of dp == "") or CNS_DATATYPE_DATAPOINT (in case of a defined datapoint (element)) is used as CNSDataIdentifierType.

main()
{
  cnsChangeNodeData("System1.View1:TreeA.Node", "ExampleDP_int", 501);
}

Availability

UI, CTRL