Class

BuildingBlocks

 A collection of cross reference building blocks.

See also BuildingBlock.

QuickLinks

[], add, anyItem, count, everyItem, firstItem, item, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

BuildingBlock [] (index: number)
Returns the BuildingBlock with the specified index.

ParameterTypeDescription
indexnumberThe index.

BuildingBlock add (blockType: BuildingBlockTypes[, appliedCharacterStyle: CharacterStyle][, customText: string][, withProperties: Object])
Creates a new cross reference building block.

ParameterTypeDescription
blockTypeBuildingBlockTypes:
BuildingBlockTypes.CUSTOM_STRING_BUILDING_BLOCK
BuildingBlockTypes.FILE_NAME_BUILDING_BLOCK
BuildingBlockTypes.CHAPTER_NUMBER_BUILDING_BLOCK
BuildingBlockTypes.PAGE_NUMBER_BUILDING_BLOCK
BuildingBlockTypes.FULL_PARAGRAPH_BUILDING_BLOCK
BuildingBlockTypes.PARAGRAPH_NUMBER_BUILDING_BLOCK
BuildingBlockTypes.PARAGRAPH_TEXT_BUILDING_BLOCK
BuildingBlockTypes.BOOKMARK_NAME_BUILDING_BLOCK
Type of the building block.
appliedCharacterStyleCharacterStyleCharacter style to be applied to the building block. (Optional)
customTextstringBuilding block custom text. Currently this is only useful in custom string building block. It is ignored for other types of building blocks. (Optional)
withPropertiesObjectInitial values for properties of the new BuildingBlock (Optional)

BuildingBlock anyItem ()
Returns any BuildingBlock in the collection.

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

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

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

BuildingBlock item (index: varies)
Returns the BuildingBlock with the specified index or name.

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

Array of BuildingBlock itemByRange (from: varies, to: varies)
Returns the BuildingBlocks within the specified range.

ParameterTypeDescription
fromBuildingBlock
Long Integer
String
The BuildingBlock, index, or name at the beginning of the range. Can accept: BuildingBlock, Long Integer or String.
toBuildingBlock
Long Integer
String
The BuildingBlock, index, or name at the end of the range. Can accept: BuildingBlock, Long Integer or String.

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

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

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

ParameterTypeDescription
objBuildingBlockThe BuildingBlock whose index comes before the desired BuildingBlock.

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

ParameterTypeDescription
objBuildingBlockThe index of the BuildingBlock that follows the desired BuildingBlock.

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

Element of

CrossReferenceFormat.buildingBlocks

Jongware, 28-Apr-2012 v3.0.3iContents :: Index