跳转到主要内容
此对象表示版面块的集合 (Block 对象) 。它是 Layout 对象的子对象,用来存储版面块。 该对象提供标准的集合功能。有关详细信息,请参阅 Working with Collections
  • ABBYY FineReader Engine 集合的索引从 0 开始。
  • 可以在 C# 中使用 foreach 语句 (在 Visual Basic .NET 中为 for each) 来操作该集合。

属性

名称类型描述
ApplicationEngine, 只读返回 Engine 对象。
Countint, 只读存储集合中元素的数量。
ElementBlock, 只读提供对集合中单个元素的访问。

方法

名称描述
AddNew创建指定类型的块对象并将其添加到集合中。
DeleteAll从集合中移除所有元素。
DeleteAt从集合中移除一个元素。
IndexOf返回块在集合中的索引。
Item提供对集合中元素的访问。

Windows

版面块

Linux 和 macOS

LayoutBlocksLinuxMac 对象图

示例

FREngine.IFRDocument frDoc;
// 遍历版面中的块
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];
  ...
 }
}
该对象在以下代码示例中使用:

另请参阅

Layout 使用 Layout 和块 使用集合 使用属性