LayoutGroups

A collection of groups.

Instance Properties

Name Description Access
length number The number of objects in the collection. read-only

Methods

add(
groupItems ​[, layer] ​[, at], reference ​[, withProperties])
 → Group
anyItem(
)
 → Group
count(
)
 → number
everyItem(
)
 → Group
firstItem(
)
 → Group
item(
index)
 → Group
itemByID(
id)
 → Group
itemByName(
name)
 → Group
itemByRange(
from, to)
 → Group
lastItem(
)
 → Group
middleItem(
)
 → Group
nextItem(
obj)
 → Group
previousItem(
obj)
 → Group
toSource(
)
 → string
add(
groupItems ​[, layer] ​[, at=LocationOptions.UNKNOWN], reference ​[, withProperties])
 → Group
Creates a new Group.
groupItems Array<PageItem> The objects to group.
layer Layer The layer on which to create the Group. (Optional)
at LocationOptions The location at which to insert the Group relative to the reference object or within the container object. (Optional)
reference The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem. (Optional)
withProperties Object Initial values for properties of the new Group (Optional)
anyItem(
)
 → Group
Returns any Group in the collection.
count(
)
 → number
Displays the number of elements in the Group.
everyItem(
)
 → Group
Returns every Group in the collection.
firstItem(
)
 → Group
Returns the first Group in the collection.
item(
index)
 → Group
Returns the Group with the specified index or name.
index The index or name. Can accept: Long Integer or String.
itemByID(
id)
 → Group
Returns the Group with the specified ID.
id number The ID.
itemByName(
name)
 → Group
Returns the Group with the specified name.
name string The name.
itemByRange(
from, to)
 → Group
Returns the Groups within the specified range.
from The Group, index, or name at the beginning of the range. Can accept: Group, Long Integer or String.
to The Group, index, or name at the end of the range. Can accept: Group, Long Integer or String.
lastItem(
)
 → Group
Returns the last Group in the collection.
middleItem(
)
 → Group
Returns the middle Group in the collection.
nextItem(
obj)
 → Group
Returns the Group whose index follows the specified Group in the collection.
obj Group The Group whose index comes before the desired Group.
previousItem(
obj)
 → Group
Returns the Group with the index previous to the specified index.
obj Group The index of the Group that follows the desired Group.
toSource(
)
 → string
Generates a string which, if executed, will return the Group.