InDesign2026
API 21.5.1.73
Collection of BuildingBlock

BuildingBlocks

A collection of cross reference building blocks.

Properties

NameType AccessDescription
Number readonly The number of objects in the collection.

Methods

BuildingBlock

Returns the BuildingBlock with the specified index.

index Number The index.
BuildingBlock

Creates a new cross reference building block.

blockType BuildingBlockTypes Type of the building block.
appliedCharacterStyle? CharacterStyle Character style to be applied to the building block.
customText? String Building block custom text. Currently this is only useful in custom string building block. It is ignored for other types of building blocks.
withProperties? Object Initial values for properties of the new BuildingBlock
BuildingBlock

Returns any BuildingBlock in the collection.

Number

Displays the number of elements in the BuildingBlock.

BuildingBlock[]

Returns every BuildingBlock in the collection.

BuildingBlock

Returns the first BuildingBlock in the collection.

BuildingBlock

Returns the BuildingBlock with the specified index or name.

index LongInteger | String The index or name. Can accept: Long Integer or String.
BuildingBlock[]

Returns the BuildingBlocks within the specified range.

from BuildingBlock | LongInteger | String The BuildingBlock, index, or name at the beginning of the range. Can accept: BuildingBlock, Long Integer or String.
to BuildingBlock | LongInteger | String The BuildingBlock, index, or name at the end of the range. Can accept: BuildingBlock, Long Integer or String.
BuildingBlock

Returns the last BuildingBlock in the collection.

BuildingBlock

Returns the middle BuildingBlock in the collection.

BuildingBlock

Returns the BuildingBlock whose index follows the specified BuildingBlock in the collection.

obj BuildingBlock The BuildingBlock whose index comes before the desired BuildingBlock.
BuildingBlock

Returns the BuildingBlock with the index previous to the specified index.

obj BuildingBlock The index of the BuildingBlock that follows the desired BuildingBlock.
String

Generates a string which, if executed, will return the BuildingBlock.

Object of 1

Properties elsewhere that hold a BuildingBlocks.