Documentation / Autodesk App Store Navisworks

Autodesk App Store Navisworks

プロフェッショナル開発者向け情報

このガイドは、Autodesk App Store でプラグインやその他のコンテンツ(無料版、試用版、有料版)を初めて公開する開発者やコンテンツ プロバイダを対象としています。このガイドでは、Autodesk App Store 向けの製品を作成する際にパブリッシャーが遵守すべきベスト プラクティスのガイドラインといくつかの要件を概説します。これらのガイドラインは、Autodesk App Store のユーザーが Store から複数の製品をダウンロードする際に、一貫した体験を提供できるようにするためのものです。Autodesk Navisworks® Manage と Autodesk® Navisworks® Simulate は、Autodesk App Store で提供されるアプリをサポートしています。アプリは、.NET API プラグインと Nwcreate プラグインの両方の追加に使用できます。

プロダクション アプリは、アプリを Autodesk App Store に申請した後に作成される MSI インストーラとして提供されます。ただし、インストーラの動作をシミュレートし、成果物をディスク上の適切な場所にコピーすれば、アプリをテストすることは可能です。登録は不要です。ここでは、.NET API プラグインを含むアプリの作成方法を説明します。

要件

前提条件

  • 登録不要のメカニズムは、Navisworks 2015 以降で機能します。1 つのリリースの .NET API は、1 つのメジャー バージョン内でのみ互換性があります。したがって、アプリケーションで複数のリリースをサポートする場合は、各バージョンの .NET API でバイナリをコンパイルし、まとめてパッケージ化する必要があります。以下の手順は、対応するバイナリの指定方法を示しています。
  • Microsoft Visual Studio 2017 以降と、Navisworks® 2018 以降のバージョンでは .NET Framework = 4.7、Navisworks® 2024 バージョンでは .NET Framework 4.8 が必要です。

ユーザー権限

ストア アプリの既定のユーザー権限は、Windows 10/11 管理者ユーザーです。インストーラの実行には、管理者権限が必要です。

Ready to run

Your product must be ready to run as soon as it's installed. It must not require the user to manually copy or register files or manually edit Navisworks settings.

If you use a licensing system, then it must allow your product to run as soon as it is installed by the user. This means that your application allows either instant activation (for example, online activation), or full functionality with a time-bombed grace period that is long enough for you to send activation information to the customer.

フォルダーとファイル

場所

Autodesk アプリケーションの読み込みには 2 つのルート フォルダーがサポートされています。これらのフォルダーを使用するのは Navisworks だけではないことにご注意ください。すべての Autodesk 製品がこれらのフォルダを共有します。

ユーザー毎のルート フォルダ:

  • %APPDATA%\Autodesk\ApplicationPlugins

マシン毎のルート フォルダ:

  • %PROGRAMDATA%\Autodesk\ApplicationPlugins

ユーザー毎フォルダにインストールされるアプリはそのユーザーしか利用できませんが、マシン毎のフォルダにインストールされるアプリはすべてのユーザが利用できます。

バンドル

上述のルート フォルダーのいずれかに、末尾が .bundle となる固有の名前を持つフォルダを作成する必要があります。このフォルダーには、PackageContents.xml という名前の構成ファイルを直接配置する必要があります。また、成果物を置くための Contents サブフォルダーも必要です。

したがって、最小限の「開発」インストールは次のような 2 つのファイルを持ちます。:

  • %APPDATA%\Autodesk\ApplicationPlugins\ADSK.MyApp.bundle\ PackageContents.xml
  • % APPDATA %\Autodesk\ApplicationPlugins\ ADSK.MyApp.bundle \ Contents\ v14\ ADSK. MyPlugin.dll

注記:

  • ここでは、Navisworks 2025 のみのバイナリを含むバンドルを対象としています。v22 は、2017 の .NET API でコンパイルされたバイナリを展開するサブフォルダの名前です。2026 のバイナリであれば、v23 のように設定します。
  • 実際のインストールでは、ドキュメント、アイコンなどが含まれるため、3 つ以上のファイルが必要になると考えられます。
  • 実際のインストールでは、ADSK を自身の ADN 開発者 ID に置き換える必要があります。この ID には、ドメイン名を逆さにしたもの(例: com.autodesk や uk.co.autodesk)を使用することをお勧めします。
  • フォルダ名は、すべての Autodesk バンドルで固有である必要があります。最初は、自身の開発者 ID を接頭表記として使用することをお勧めします。
  • インストールする各 DLL の名前は、Navisworks の実行セッション内で固有のものである必要があります。Navisworks によってインストールされる DLL や、他のアプリによって提供される DLL と競合しないようにします。最初は、自身の開発者 ID を接頭表記として使用することをお勧めします。

構成

The minimum ‘development’ configuration file will be along the lines of:

<?xml version="1.0" encoding="utf-8"?>

<ApplicationPackage > 

  <Components Description="2026 parts">

    <RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw23" SeriesMax="Nw23" />

    <ComponentEntry AppType="ManagedPlugin"ModuleName="./Contents/v23/ADSK.MyPlugin.v23.dll">

    </ComponentEntry>

  </Components>

  <Components Description="2025 parts">

    <RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw22" SeriesMax="Nw22" />

     <ComponentEntry AppType="ManagedPlugin"ModuleName="./Contents/v22/ADSK.MyPlugin.v22.dll">

  </Components>

</ApplicationPackage>

This example specifies a single ‘Component’:

  • OS="Win64": This component works for 64-bit product only.
  • Platform="NAVMAN|NAVSIM": This component works in both Navisworks Manage and Navisworks Simulate.
  • SeriesMin="Nw23" SeriesMax="Nw23": Nw23 means this component works for Navisworks 2026 version. As said above, our .NET API of on release is only compatible within one major version. Similarly, Nw22 means this is a component that works with Navisworks 2025.
  • AppType="ManagedPlugin": This component is a managed .NET assembly that contains plugins targeted at the Navisworks .NET API.
  • ModuleName="./Contents/v23/ADSK.MyPlugin.dll": Specifies the relative path to the components .NET Assembly. We’ve put it in a ‘v23’ folder signifying it’s targeted at “Navisworks 2026” only. You can put specific release of binary in specific folders, or name them uniquely in one folder.

Notes:

  • Real configuration files will require more content than this.
  • The <ApplicationPackage> element can contain multiple <Components> elements. Each component can target a different Platform and Series.

In this example the DLL pointed to by ModuleName is a managed .NET assembly. This could be written as a C# ‘Class Library’ and could contain a basic “Hello World” AddInPlugin as defined in the following code.
using Autodes.Navisworks.Api.Plugins;
...
 [PluginAttribute("MyPlugin", "ADSK", DisplayName = "Myplugin : Hello World")]
 [AddInPluginAttribute(AddInLocation.AddIn)]
 public class Myplugin : AddInPlugin
{
 public override int Execute(params string[] parameters)
 {
  MessageBox.Show("hello World");
  return 0;
}
}
...

Notes:

  • You will have to add a reference to %PROGRAMFILES%\Autodesk\Navisworks Manage <release number>\Autodesk.Navisworks.Api.dll. (‘CopyLocal’ should be set to False).
  • Real code should use your own unique Developer ID.

NWcreate ‘File loader’ のサポート

コンポーネントでは、DLL が NWcreate スタイルの 'File loader' であることも指定できます。これをおこなうには、AppType="NativeLoader" を使用します。

プラグインを使用して F1 キーでヘルプをポップ アウト表示する開発者向けの情報: 現在、Windows API で F1 キーに連結して、独自のヘルプ ページを表示する方法があります。

追加情報

ADN チームは、Autodesk App Store でのパブリッシャーとしての成功を支援します。本ガイドラインおよび Autodesk App Store Publisher Center のその他のドキュメントをご確認の上、ご不明な点がございましたら、appsubmissions@autodesk.com までメールでお問い合わせください。