> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MergePatterns Method of the Engine Object

This method merges several user pattern files into one file.

## Syntax

### C++

```cpp theme={null}
HRESULT MergePatterns(
  IStringsCollection* SourceFilesNames,
  BSTR                DestinationFileName
);
```

### C\#

```csharp theme={null}
void MergePatterns(
  IStringsCollection SourceFilesNames,
  string            DestinationFileName
);
```

### Visual Basic .NET

```vb theme={null}
Sub MergePatterns( _
  SourceFilesNames As IStringsCollection, _
  DestinationFileName As String _
)
```

## Parameters

SourceFilesNames

\[in] This variable of the [StringsCollection](/fine-reader/engine/api-reference/supplementary-objects-and-methods/stringscollection) type contains a collection of the full paths to the user pattern files that are to be merged. These files should be created by the [IEngine::CreateEmptyUserPattern](/fine-reader/engine/api-reference/engine-object-iengine-interface/creation-methods/createemptyuserpattern-method) method or by ABBYY FineReader.

DestinationFileName

\[in] This variable contains the full path to the resulting user pattern file.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## Remarks

User patterns are files that define a number of pairs "image of a character — the character itself". User patterns may be used during recognition to identify characters of non-standard fonts. To use a user pattern during recognition, set the path to it in the [IRecognizerParams::UserPatternsFile](/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/recognizerparams#userpatternsfile) property.

## See also

[Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface)

[CreateEmptyUserPattern](/fine-reader/engine/api-reference/engine-object-iengine-interface/creation-methods/createemptyuserpattern-method)

[Recognizing with Training](/fine-reader/engine/guided-tour/advanced-techniques/using-gui-elements/recognizing-with-training)
