comet.CGroup¶
- class comet.CGroup¶
- Inherits:
Methods¶
- CGroup.getGroup()¶
Get the parent group this group belongs to, if any.
- Returns
The group if one exists, else
None
- Return type
- Raises
CometError – On internal error
- Available
- CScript
- CGroup.getMembers()¶
Get the members of this group.
- Returns
The group members
- Return type
- Raises
CometError – On internal error
- Available
- CScript
- CGroup.addMembers(objects)¶
Add new members to this group.
Due to a limitation in the InDesign® SDK, this recreates the group, causing the UID to change.
- Parameters
- Raises
TypeError – When parameter types are invalid
- Available
- CScript
- CGroup.removeMembers(objects)¶
Remove members from this group, parenting them directly below the group at above level in the document hierarchy.
The original order in the group is preserved.
When the group would contain zero or one entries afterwards, it is automatically resolved. This leaves this object in an invalid state.
- Parameters
objects (list[int] | list[CPageItem]) –
The objects to remove.
The parameter type can be:
- Return type
- Raises
CometError – On internal error
TypeError – When parameter types are invalid
ValueError – When parameter objects is
tuple
[int
,int
] and count is <= 0
- Available
- CGroup.resolve()¶
Resolve this group by placing all members underneath the next parent group beginning at the index of this group, or the root.
Members are not deleted from the document.
All subsequent calls to this object’s functions will fail.
- Return type
- Raises
CometError – On internal error
- Available
- CScript