Require: IP-Symcon >= 2.1
int IPS_GetLinkIDByName (string $LinkName, int $ParentID)
Name of the link
Object whose children are searched
ID of the found link otherwise FALSE
The command tries to determine the ID of the link called LinkName, whose parent has the ID ParentID. It will use the ID of the first found link whose name matches with LinkName. If such a link was found, its ID is returned, otherwise FALSE.
Caution: Names in IP-Symcon can be chosen freely, so they are not unique. For this reason, the command can return a false ID.
This function generates a warning if the name was not found. Use the @ operator, if you want to suppress this message. The exact function of this operator you can look up in the PHP manual.
$LinkID = @IPS_GetLinkIDByName("Linked rain sensing", $ParentID); if ($LinkID === false) echo "Link not found!"; else echo "The Link ID is: ". $LinkID;