.. highlightlang:: us .. index:: GetParent .. _getparent: GetParent ========= .. us.tag GetParent ENGLISH :ref:`GetParent` returns the handle of the parent object. .. function:: hParent = GetParent(handle) .. us.return **Return Value** *hParent* is the handle of the parent object. If the object does not have a parent, the functions returns 0. .. us.params **Parameters** .. uparam:: handle *handle* is the handle of the object. List of parents: .. list-table:: :header-rows: 1 * - Value - Meaning * - ``OBJ_XYDATASET`` - returns the diagram handle ``OBJ_LAYER``. * - ``OBJ_XYZDATASET`` - returns the diagram handle ``OBJ_LAYER``. * - ``OBJ_TEXT`` - returns the diagram handle ``OBJ_LAYER``. * - ``OBJ_RECT`` - returns the diagram handle ``OBJ_LAYER``. * - ``OBJ_ELLIPSE`` - returns the diagram handle ``OBJ_LAYER``. * - ``OBJ_LINE`` - returns the diagram handle ``OBJ_LAYER``. * - ``OBJ_LINK`` - returns the diagram handle ``OBJ_LAYER``. * - ``OBJ_OLEITEM`` - returns the diagram handle ``OBJ_LAYER``. * - ``OBJ_LAYER`` - returns the page handle ``OBJ_PAGE``. * - ``OBJ_PAGE`` - returns the document handle ``OBJ_DOCUMENT``. .. us.comment **Comment** The function returns 0 for all other objects. .. seealso:: :ref:`AppGetActiveDocument`, :ref:`AppGetActivePage` :sub:`id-472654`