AddNew Method of the LayoutBlocks Object

This method creates a Block object of the type specified and adds it into the collection of the layout blocks.

Syntax

C++

HRESULT AddNew(
  BlockTypeEnum BlockType,
  IRegion*      BlockRegion,
  int           Position,
  IBlock**      Result
);
    

C#

IBlock AddNew(
  BlockTypeEnum BlockType,
  Region        BlockRegion
  int           Position
);
    

Visual Basic .NET

Function AddNew( _
  BlockType As BlockTypeEnum, _
  BlockRegion As Region, _
  Position As Integer _
) As IBlock
    

Parameters

BlockType
[in] This variable of the BlockTypeEnum type specifies the type of the newly created block. It cannot be BT_AutoAnalysis, BT_Separator, BT_SeparatorGroup.
BlockRegion
[in] Refers to the Region object that specifies the region of the newly created block. It is optional and can be null, in which case the block is created of the dimensions ILayout::Height, ILayout::Width. If the width and height of the layout are equal to 0, the new block will be of the dimensions 1*1 pixels.
Position
[in] Specifies the position of the newly created block in the collection.
Result
[out, retval] A pointer to IBlock* pointer variable that receives the interface pointer of the created block.

Return values

This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.

See also

LayoutBlocks

Block

Working with Collections

24.03.2023 8:51:52

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.