Documentation
IPS_CreateLink
Require: Symcon >= 2.1
int IPS_CreateLink ()
Returns
ID of the newly created link
Description
The function creates a new link. It requires no parameters. After the execution a new link named "Unnamed Object (ID: 48490)" or similar, depending on the ID, appears in the category tree of IP-Symcon. The function IPS_SetName can be used to give a meaningful name to the new link. The name is irrelevant for identification. The ID is always responsible for that.
Furthermore, the link should be linked to another object. This can be done via the function IPS_SetLinkTargetID.
The function returns an ID that uniquely identifies the created link.
Example
//Create a new link called "Rain sensing"
$LinkID = IPS_CreateLink(); //Create link
IPS_SetName($LinkID, "Rain sensing"); //Name the link
IPS_SetParent($LinkID, 12345); //Set a parent
IPS_SetLinkTargetID($LinkID, 54321); //Attach the link