Skip to main content
This script is used to determine whether the array of documents passed to the user can be merged into one document. For this, assembly errors for the result document are generated. Assembly succeeds when the result document contains no more assembly errors than either source document. Those two documents are then merged into one. The script is configured on the Assembly tab of the Document Definition properties. To open the script editor window, click the Edit Assembly Script… button under the Use custom assembly rules option. The script runs automatically after recognition, and it then contains the assembly errors generated during the standard check. To refresh the assembly manually, select Tools → Refresh Assembly.

Parameters

Document assembly scripts created in ABBYY FlexiCapture 11 and earlier keep working in ABBYY FlexiCapture 12. If you delete such a script, you have to write a replacement against the new interface, which uses a collection of child elements. Avoid addressing a document’s internal fields, because doing so loads the whole document and can slow assembly down. Where you need to address document fields, prefer index fields. The AssemblingErrors parameter can hold different assembly errors depending on how you obtain it:
  1. AssemblingErrors can be passed to the script as one of input parameters. In this case it will contain the error of the current check.
  2. One of input parameters of the script is a collection of documents for which the assembly script is launched. Each document has its own assembly errors, which can be retrieved the following way: document.AssemblingErrors. In this case the AssemblingErrors parameter will contain errors of the last check carried out for the given document.
Write procedures that you use in more than one rule to the global rule module. Open it from the script editor. From the drop-down list on the toolbar of the script editor, select Rule Global Script Module. The global rule module can also be accessed from the Document Definition editor (Document Definition → Script Modules → Rule Script…). A script or global module can use classes and methods of an external assembly. Attach the assembly file on the .NET References tab of the Document Definition properties.