« Back to Product

Documentation

IPS_GetLink

Require: IP-Symcon >= 2.1

 array IPS_GetLink (int $LinkID) 

Parameters

LinkID

ID of the link

Returns

The following information are available as key => value pairs:

Index  Type Description
LinkID integer ObjectID
LinkChildID(until 3.4) integer ID of the object with which this link is connected. See: IPS_SetLinkTargetID (since 4.0 permanently replaced by TargetID)
TargetID(since 2.6) integer ID of the object with which this link is connected. See: IPS_SetLinkTargetID

Description

The command returns an array containing information about the link with the ID LinkID. If the link does not exist, a warning is generated.

Warning

The functionality until version 3.4 is provided with the function "array IPS_GetLinkCompatibility(integer $LinkID)" since version 4.0 and can be accessed with Special Switches.

Example

//Since Version 4.0
print_r(IPS_GetLink(19668)); 

/* returns e.g.:
Array
(
    [LinkID] => 19668
    [TargetIDID] => 14444
)
*/

print_r(IPS_GetLinkCompatibility(19668));

/* returns e.g.:
Array
(
    [LinkID] => 19668
    [LinkChildID] => 14444
    [TargetID] => 14444
)
*/

//Up to Version 3.4
print_r(IPS_GetLink(19668));

/* returns e.g.:
Array
(
    [LinkID] => 19668
    [LinkChildID] => 14444
    [TargetID] => 14444
)
*/
Any questions?