Adobe InDesign CS2 (4.0) Object Model JS: Groups

InDesign CS2

Class

Groups

 A collection of groups.

QuickLinks

add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

Group add (groupItems: Array of PageItem[, layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])
Create a new Group

ParameterTypeDescription
groupItems Array of PageItemA list of page items to group
layerLayerThe layer on which to create the Group (Optional)
atLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
Location (Optional) (default: LocationOptions.UNKNOWN)
referenceDocument
Layer
MasterSpread
Page
Spread
Before/after this Group or at the beginning/end of this Document, Spread, Master Spread, Page or Layer. Can accept: Document, Spread, MasterSpread, Page or Layer. (Optional)
withPropertiesObjectInitial values for properties of the new Group (Optional)

Group anyItem ()
Returns any Group in the collection.

number count ()
Displays the number of elements in the Group.

Array of Group everyItem ()
Returns every Group in the collection.

Group firstItem ()
Returns the first Group in the collection.

Group item (index: any)
Returns the Group with the specified index or name.

ParameterTypeDescription
indexLong
String
The index or name. Can accept: Long or String.

Group itemByID (id: number)
Returns the Group with the specified ID.

ParameterTypeDescription
idnumberThe ID.

Group itemByName (name: string)
Returns the Group with the specified name.

ParameterTypeDescription
namestringThe name.

Array of Group itemByRange (from: any, to: any)
Returns the Groups within the specified range.

ParameterTypeDescription
fromGroup
Long
String
The Group, index, or name at the beginning of the range. Can accept: Group, Long or String.
toGroup
Long
String
The Group, index, or name at the end of the range. Can accept: Group, Long or String.

Group lastItem ()
Returns the last Group in the collection.

Group middleItem ()
Returns the middle Group in the collection.

Group nextItem (obj: Group)
Returns the Group whose index follows the specified Group in the collection.

ParameterTypeDescription
objGroupThe Group whose index comes before the desired Group.

Group previousItem (obj: Group)
Returns the Group with the index previous to the specified index.

ParameterTypeDescription
objGroupThe index of the Group that follows the desired Group.

string toSource ()
Generates a string which, if executed, will return the Group.

Element of

Button.groups

Cell.groups

Character.groups

Document.groups

Footnote.groups

GraphicLine.groups

Group.groups

InsertionPoint.groups

Layer.groups

Line.groups

MasterSpread.groups

Oval.groups

Page.groups

PageItem.groups

Paragraph.groups

Polygon.groups

Rectangle.groups

Spread.groups

State.groups

Story.groups

Table.groups

Text.groups

TextColumn.groups

TextFrame.groups

TextStyleRange.groups

Word.groups

Jongware, 27-Jun-2010 v3.0.3dContents :: Index