Skip to main content
This object represents a collection of layout blocks (Block objects). It is a subobject of a Layout object, and it serves as a storage of Layout blocks. The object provides standard collection functionality. See Working with Collections for details.
  • The indexing of ABBYY FineReader Engine collections starts with 0.
  • The foreach statement in C# (for each in Visual Basic .NET) can be used to manipulate the collection.

Properties

NameTypeDescription
ApplicationEngine, read-onlyReturns the Engine object.
Countint, read-onlyStores the number of elements in the collection.
ElementBlock, read-onlyProvides access to a single element of the collection.

Methods

NameDescription
AddNewCreates a block object of the specified type and adds it into the collection.
DeleteAllRemoves all the elements from the collection.
DeleteAtRemoves an element from the collection.
IndexOfReturns the index of a block in the collection.
ItemProvides access to an element of the collection.

Windows

LayoutBlocks

Linux and macOS

LayoutBlocksLinuxMac Object Diagram

Samples

FREngine.IFRDocument frDoc;
// Iterates blocks of layout
for (int iPage = 0; iPage < frDoc.Pages.Count; iPage++)
{
 FREngine.IFRPage page = frDoc.Pages[iPage];
 FREngine.ILayout layout = page.Layout;
 int blocksCount = layout.Blocks.Count;
 for (int iBlock = 0; iBlock < blocksCount; iBlock++)
 {
  FREngine.IBlock block = layout.Blocks[iBlock];
  ...
 }
}
The object is used in the following code samples:

See also

Block Layout Working with Layout and Blocks Working with Collections Working with Properties