When you write scripts in .NET languages, a few things differ from VBScript and JScript.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.
Accessing objects
Use theWorkspace and ExportBatch keywords to access Scanning Station object elements.
Framework and assemblies
- Compile .NET assemblies using .NET Framework 4.0 or later. Set the target framework in your Visual Studio project properties.
- You can add external assemblies — standard or user-compiled — and every class inside becomes available in scripts and global modules. See External assemblies.
- Scanning Station objects don’t support multithreading.
Debugging
- Use the
System.Diagnostics.Debugger.Breakmethod to break into the debugger. - Debugging also requires a
.pdbfile with debug information. These files can be very large — we recommend keeping them outside the project. Make sure the script is compiled with the debugging information included. In Microsoft Visual Studio, you can attach to the process where the .NET code runs.
using directives
You can put using-style directives at the top of a script, alongside comments and blank lines. The syntax matches the language:
- C#.Net:
using - JScript.Net:
Import - VisualBasic.Net:
Imports
A
using directive only works if it appears before the first line of executable code. For example:Functions and optional parameters
- Functions from global modules are called directly in .NET scripts — you don’t need to prefix them with the global module name.
- To skip an optional parameter, pass
System.Type.Missinginstead.
