
## BuildingBlockCollection class

A collection of [BuildingBlock](../../aspose.words/buildingblock/) objects in the document.
To learn more, visit the [Aspose.Words Document Object Model (DOM)](https://docs.aspose.com/words/nodejs-net/aspose-words-document-object-model/) documentation article.




### Remarks

You do not create instances of this class directly. To access a collection 
of building blocks use the [GlossaryDocument.buildingBlocks](../glossarydocument/buildingBlocks/) property.




**Inheritance:** [BuildingBlockCollection](./) → [NodeCollection](../../aspose.words/nodecollection/)

### Properties

| Name | Description |
| --- | --- |
| [count](../../aspose.words/nodecollection/count/) | Gets the number of nodes in the collection.<br>(Inherited from [NodeCollection](../../aspose.words/nodecollection/)) |
| [this[]](../../aspose.words/nodecollection/this[]/) | <br>(Inherited from [NodeCollection](../../aspose.words/nodecollection/)) |

### Methods

| Name | Description |
| --- | --- |
|[ add(node)](../../aspose.words/nodecollection/add/#node) | Adds a node to the end of the collection.<br>(Inherited from [NodeCollection](../../aspose.words/nodecollection/)) |
|[ clear()](../../aspose.words/nodecollection/clear/#default) | Removes all nodes from this collection and from the document.<br>(Inherited from [NodeCollection](../../aspose.words/nodecollection/)) |
|[ contains(node)](../../aspose.words/nodecollection/contains/#node) | Determines whether a node is in the collection.<br>(Inherited from [NodeCollection](../../aspose.words/nodecollection/)) |
|[ indexOf(node)](../../aspose.words/nodecollection/indexOf/#node) | Returns the zero-based index of the specified node.<br>(Inherited from [NodeCollection](../../aspose.words/nodecollection/)) |
|[ insert(index, node)](../../aspose.words/nodecollection/insert/#number_node) | Inserts a node into the collection at the specified index.<br>(Inherited from [NodeCollection](../../aspose.words/nodecollection/)) |
|[ remove(node)](../../aspose.words/nodecollection/remove/#node) | Removes the node from the collection and from the document.<br>(Inherited from [NodeCollection](../../aspose.words/nodecollection/)) |
|[ removeAt(index)](../../aspose.words/nodecollection/removeAt/#number) | Removes the node at the specified index from the collection and from the document.<br>(Inherited from [NodeCollection](../../aspose.words/nodecollection/)) |
|[ toArray()](./toArray/#default) | Copies all building blocks from the collection to a new array of building blocks. |

### See Also

* module [Aspose.Words.BuildingBlocks](../)
* class [NodeCollection](../../aspose.words/nodecollection/)
* class [GlossaryDocument](../glossarydocument/)
* property [GlossaryDocument.buildingBlocks](../glossarydocument/buildingBlocks/)
* class [BuildingBlock](../../aspose.words/buildingblock/)

