メインコンテンツへスキップ

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.

スクリプトやグローバルモジュールで、外部アセンブリを使用できます。標準アセンブリとユーザーがコンパイルしたアセンブリの両方がサポートされています。アタッチしたアセンブリ内のすべてのクラスとメソッドを、スクリプトで利用できます。

アセンブリを追加する場所

アセンブリは次の 2 か所に追加できます。
  • Batch Type Propertiesダイアログの Scripts タブ — アセンブリはそのバッチタイプでのみ利用できます。
  • Tools > Options… — アセンブリをすべてのスクリプトとグローバルモジュールで共通して利用できます。

アセンブリをアタッチする

  1. Project Properties ダイアログを開き、Scripts タブをクリックして、References .NET… をクリックします。
  2. 開いたダイアログで、Add… をクリックします。
  3. Add Assembly ダイアログで、型 field でソースを選択します。
    • Attached file — ファイルのパスを指定します。
    • Standard assembly name — 標準名を指定します。

以下は、名前空間、クラス、メソッドを含むアセンブリのサンプルです。
namespace TestNameSpace
{
    public class Test
    {
        public void Show(string text)
        {
            // 静的メソッド System.Windows.Forms.MessageBox.Show(string) を使用してメッセージを表示します。
            System.Windows.Forms.MessageBox.Show(text);
        }
    }
}
スクリプトでこのクラスを使用するには:
TestNameSpace.Test test = new TestNameSpace.Test(); // Testのインスタンスを作成する
test.Show("Hello world"); // Showメソッドを呼び出す