NextDesign.Interop 1.1.2.10908

dotnet add package NextDesign.Interop --version 1.1.2.10908
                    
NuGet\Install-Package NextDesign.Interop -Version 1.1.2.10908
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NextDesign.Interop" Version="1.1.2.10908" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NextDesign.Interop" Version="1.1.2.10908" />
                    
Directory.Packages.props
<PackageReference Include="NextDesign.Interop" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NextDesign.Interop --version 1.1.2.10908
                    
#r "nuget: NextDesign.Interop, 1.1.2.10908"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NextDesign.Interop@1.1.2.10908
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NextDesign.Interop&version=1.1.2.10908
                    
Install as a Cake Addin
#tool nuget:?package=NextDesign.Interop&version=1.1.2.10908
                    
Install as a Cake Tool

1. 概要

  • Next Design を外部アプリケーションから制御するための.NETライブラリです。
  • 制御対象の Next Design には NDInterop エクステンションのインストールが必要です。

2. インストール方法

コマンドプロンプトより次のように実行してください。

> dotnet add package NextDesign.Interop

3. 利用方法

制御は Next Design のスクリプトを呼び出すことによって実現します。スクリプトでプロジェクトファイルを読み込んだり、保存したりエラーチェックをしたり、UI の状態を変更できます。また、UI の状態を戻り値で返すことで連続的な操作も可能です。

インストールしている Next Design を新規に起動する場合は NextDesignAppFactory.Start() を用います。Next Design のプロジェクトファイルが関連づいている Next Design のプログラムのパスを自動的に検索して起動します。

using NextDesign.Interop;
using NextDesign.Interop.Interfaces;

// インストールしている Next Design を起動します。
var ndApp = NextDesignAppFactory.Start();
var ret = ndApp.RunScript("return Version;");
Console.WriteLine(ret.ReturnValue);

Next Design のアプリケーションのパスを指定しての実行も可能です。

using NextDesign.Interop;
using NextDesign.Interop.Interfaces;

var ndApp = NextDesignAppFactory.Start(@"C:\Program Files\....\NextDesign.exe");
var ret = ndApp.RunScript("return Version;");
Console.WriteLine(ret.ReturnValue);

起動している Next Design にアタッチする場合は NextDesignAppFactory.Attach() メソッドを用います。NextDesignAppFactory.AttachOrStart() を用いれば、プロセスがあればアタッチしてなければ自動的に起動します。

using NextDesign.Interop;
using NextDesign.Interop.Interfaces;

// 複数起動している場合はプロセスIdが一番大きい(新しいプロセス)にアタッチします
var ndApp = NextDesignAppFactory.Attach();
var ret = ndApp.RunScript("return Version;");
Console.WriteLine(ret.ReturnValue);

特定のプロセスにアタッチする場合は Process や processId を渡します。

using NextDesign.Interop;
using NextDesign.Interop.Interfaces;
using System.Diagnostics;

var process = Process.Start(@"C:\Program Files\....\NextDesign.exe");
var ndApp = NextDesignAppFactory.Attach(process);
var ret = ndApp.RunScript("return Version;");

特定の Next Design のプロセスを探してアタッチする場合は次のようにします。

using NextDesign.Interop;
using NextDesign.Interop.Interfaces;

var projectFile = "...";
var processes = NextDesignAppFactory.GetNextDesignProcesses();
INextDesignApp app = null;

foreach (var process in processes)
{
    var ndApp = NextDesignAppFactory.Attach(process);
    if (ndApp.CurrentProjectFilePath == projectFile)
    {
        app = ndApp;
        break;
    }
}

var result = app.RunScript("...");

if (!result.IsSuccess)
{
    Console.WriteLine($"エラーが発生しました。{result.ErrorMessage}");
}
else
{
    // スクリプトに戻り値があれば `RunScriptResult.ReturnValue` プロパティで取得できます。
    Console.WriteLine($"[成功] {result.ReturnValue}");
}

実行中の Next Design の指定プロセスにアタッチするか、なければ起動する場合は次のようにします。

using NextDesign.Interop;
using NextDesign.Interop.Interfaces;

// 複数起動している場合はプロセスIdが一番大きい(新しいプロセス)にアタッチします
var ndApp = NextDesignAppFactory.AttachOrStart();
var ret = ndApp.RunScript("return Version;");
Console.WriteLine(ret.ReturnValue);

実行結果は RunScriptResult オブジェクトで取得できます。

using NextDesign.Interop.Interfaces;

var result = app.RunScript("...");

if (!result.IsSuccess)
{
    Console.WriteLine($"エラーが発生しました。{result.ErrorMessage}");
}
else
{
    // スクリプトに戻り値があれば `RunScriptResult.ReturnValue` プロパティで取得できます。
    Console.WriteLine($"[成功] {result.ReturnValue}");
}

必要に応じて、Start() で新規起動したり、Attach() で既存プロセスに接続したりできます。

4. パッケージのアンインストール方法

次のコマンドを実行してください。

> dotnet remove package NextDesign.Interop
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2.10908 100 9/29/2026
1.1.1.10306 337 9/29/2026
1.1.0.41031 725 9/29/2026

### 1.1.2
- 脆弱性対策として `System.Text.RegularExpressions` 4.3.1 を追加。

## 1.1.1
- 新規公開