NextDesign.Interop.Interfaces 1.1.1.10908

dotnet add package NextDesign.Interop.Interfaces --version 1.1.1.10908
                    
NuGet\Install-Package NextDesign.Interop.Interfaces -Version 1.1.1.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.Interfaces" Version="1.1.1.10908" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NextDesign.Interop.Interfaces" Version="1.1.1.10908" />
                    
Directory.Packages.props
<PackageReference Include="NextDesign.Interop.Interfaces" />
                    
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.Interfaces --version 1.1.1.10908
                    
#r "nuget: NextDesign.Interop.Interfaces, 1.1.1.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.Interfaces@1.1.1.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.Interfaces&version=1.1.1.10908
                    
Install as a Cake Addin
#tool nuget:?package=NextDesign.Interop.Interfaces&version=1.1.1.10908
                    
Install as a Cake Tool

1. 概要

  • Next Design と外部アプリケーション/拡張機能の間で共有するインターフェースと共通データ型を定義する.NETライブラリです。
  • 実際の制御処理は含まず、NextDesign.Interop がこの契約を利用します。

2. インストール方法

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

> dotnet add package NextDesign.Interop.Interfaces

3. 利用方法

3.1. 参照する

NextDesign.Interop.Interfaces を参照し、インターフェース経由で Next Design の機能を利用する実装を記述します。

using NextDesign.Interop.Interfaces;

public class Sample
{
    private readonly INextDesignApp _app;

    public Sample(INextDesignApp app)
    {
        _app = app;
    }

    public void ShowInfo()
    {
        Console.WriteLine(_app.Version);
    }
}

3.2. スクリプトを実行する

RunScript() でプロジェクトを実行します。以下ではモデル数とリレーション数を出力ペインに表示する例です。

using System;
using NextDesign.Interop.Interfaces;

public class Sample
{
    private readonly INextDesignApp _app;

    public Sample(INextDesignApp app)
    {
        _app = app;
    }

    public void ShowSummary()
    {
        var script = @"
const string category = "モデル・関連数カウント";
var project = App.Workspace.OpenProject(""C:\Work\Sample.nproj"");
var models = project.GetAllChildren().ToList();
var relationshipCount = models
    .Prepend(project.DesignModel)
    .SelectMany(model => model.GetRelationsWhere(
        (relationship, field) => true))
    .Select(relationship => relationship.Id)
    .Distinct()
    .Count();

Output.Clear(category);
Output.WriteLine(category, $"プロジェクト名 : {project.Name}");
Output.WriteLine(category, $"モデル数       : {models.Count}");
Output.WriteLine(category, $"関連数         : {relationshipCount}");

Window.IsInformationPaneVisible = true;
Window.ActiveInfoWindow = "Output";
Window.CurrentOutputCategory = category;
";

        var result = _app.RunScript(script);

        if (!result.IsSuccess)
        {
            Console.WriteLine(result.ErrorMessage);
            return;
        }

        Console.WriteLine(result.ReturnValue);
    }
}

3.3. 結果を受け取る

RunScriptResult には IsSuccess、ErrorMessage、ReturnValue、Exception が入ります。失敗時は ErrorMessage に加えて Exception の詳細を確認できます。

using System;
using NextDesign.Interop.Interfaces;

var result = _app.RunScript("return Version;");

if (result.IsSuccess)
{
    Console.WriteLine($"[成功] {result.ReturnValue}");
}
else
{
    Console.WriteLine($"[失敗] {result.ErrorMessage}");
    if (result.Exception != null)
    {
        Console.WriteLine(result.Exception.GetDetailedMessage());
    }
}

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

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

> dotnet remove package NextDesign.Interop.Interfaces
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.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on NextDesign.Interop.Interfaces:

Package Downloads
NextDesign.Interop

NextDesignのプロセス間通信のクライアントライブラリです

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1.10908 148 9/29/2026
1.1.0.41031 946 9/29/2026

## 1.1.1
- README追加

## 1.1.0
- 新規公開