« Back to Product

Documentation

IPS_GetObject

 array IPS_GetObject (int $ObjectID) 

Parameters

ObjectID

The ID of the object

Returns

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

Index Type Description
ChildrenIDs array Object IDs of the children. See: IPS_GetChildrenIDs
HasChildren boolean TRUE if the object has child objects. See: IPS_HasChildren
ObjectID integer ID of the object
ObjectIcon string File name of the icon without extension. See: IPS_SetIcon
ObjectIdent string Identifier of the Object. See: IPS_SetIdent
ObjectInfo string Description that can be provided by the user. See: IPS_SetInfo
ObjectIsDisabled (since 4.0) boolean TRUE if the object is disabled. See IPS_SetDisabled
ObjectIsHidden boolean TRUE if the object is hidden in the visualization. See IPS_SetHidden
ObjectIsReadOnly boolean TRUE if the object is read-only. (Currently only used for state variables)
ObjectName string Name of the Object. See: IPS_SetName
ObjectPosition integer Position of the object in the visualization. This value may not be unique. See: IPS_SetPosition
ObjectType integer Type of the object (0: Category, 1: Instance, 2: Variable, 3: Script, 4: Event, 5: Media, 6: Link)
ObjectSummary string   Short description of an object, which is generated by the module if needed
ParentID integer Parent object. 0 = No parent object. See: IPS_SetParent

Description

This function returns an array containing information about the object with the ID ObjectID. If the object is not available, an alert is generated.

Example

print_r(IPS_GetObject(19668));
 
/* returns, e.g.,:
Array
(
    [ParentID] => 26691
    [ObjectID] => 43502
    [ObjectType] => 1
    [ObjectIdent] =>
    [ObjectName] => MX FESLIM (ID: 1)
    [ObjectInfo] => This is a device instance
    [ObjectIcon] => IPS
    [ObjectSummary] =>
    [ObjectPosition] => 1
    [ObjectIsReadOnly] =>
    [ObjectIsHidden] =>
    [ObjectIsDisabled] =>
    [ObjectIsLocked] =>
    [HasChildren] => 1
    [ChildrenIDs] => Array
    (
        [0] => 43430
        [1] => 55892
        [2] => 36597
        [3] => 18993
        [4] => 34524
        [5] => 12269
        [6] => 44450
        [7] => 23394
        [8] => 11693
        [9] => 13654
    )
)
*/
Any questions?