Skip to main content
You can use external assemblies in scripts and global modules. Both standard and compiled user assemblies work.

Add an external assembly

Add external assemblies on the Scripts tab of the Batch Type Properties dialog box or in Tools → Options…. All the classes and methods of the assemblies you add are available to scripts and global modules. Assemblies that you add to the properties of a batch type or a Document Definition are available only to that batch type or Document Definition.
1

Open the References dialog box

Open the Project Properties dialog box, click the Scripts tab, and click References .Net….
2

Add the assembly

In the dialog box that opens, click Add….
3

Choose the assembly type

In the Add Assembly dialog box, select Attached file or Standard assembly name in the type field.
4

Specify the assembly

Depending on the selected type, specify either the path to the file or the standard name.
This sample user assembly contains a namespace, a class, and a method of that class:
A script that uses a class and methods from an external assembly contains the following code:

Debug external assemblies

To debug external assemblies, you need both the assembly file and the .pdb file with symbolic information. You can debug only assemblies with loaded .pdb files. Because .pdb files are large, disable loading symbolic information in the working project.

Registry keys that control loading symbolic information

Use the following registry keys to specify whether to load .pdb files:
  • HKEY_CURRENT_USER\Software\ABBYY\ScanStationFC\4.0\Shell\Script [LoadSymbolsFromOriginalPath] – Specifies whether to load .pdb files from the same folder as the assembly. To load .pdb files, set the value to True.
  • HKEY_CURRENT_USER\Software\ABBYY\ScanStationFC\4.0\Shell\Script [PDBSearchLocations] = <path to the folder with PDB files> – Specifies the search paths for .pdb files. Separate paths with semicolons. The search returns a .pdb file with symbolic information whose name matches the assembly name.
These keys do not exist in the registry by default. If required, the Administrator can add them to the registry of the user’s operating system. To apply the registry changes, restart the Scanning Station. To debug an assembly, connect to the managed code.