Onetastic Macro Documentation >
>
>
GetParentOfType GetParentOfType
Returns true if the given object has a parent of given type and stores that parent in the parent parameter.
Syntax
Bool GetParentOfType(
Object object,
ObjectType type,
out Object parent)
Parameters
- Object object
- Object to look for a parent of.
- ObjectType type
- Type of the parent to look for.
- out Object parent
- If a parent is found, it is stored in this parameter. Check the return value of the function to know whether a parent was found or not.
Examples
$image = QueryObjects("Image", GetCurrentPage())
if (GetParentOfType($image, "Paragraph", $parentParagraph))
else
|