Fusion 360 API での JavaScript サポートについて

少し情報が古くなってしまいますが、Fusion 360 API でサポートされていた JavaScript が昨年 7 月の Fusion 360 アップデートから削除されていますので、改めてご案内しておきます。

過去のブログ記事 Fusion 360 API:開発言語の選択 等でもご案内していたとおり、従来、Fusion 360 のスクリプトやアドイン開発でサポートする言語には、JavaScript、Python、C++の 3 種類が存在していました。ただし、実装の都合上、JavaScript のみが Fusion 360 の外部プロセスで実行される仕組みになっていたので、残念ながら、他の言語で記述されたコードに比べると、その実行スピードが遅くなってしまう、という欠点がありました。

A table comparing programming languages C++, Python, and JavaScript, highlighting their IDE compatibility, scripting options, execution methods, and processing speed.

その影響もあって、Python に比較して利用者の数に伸び悩みがあったようです。抜本的な構造上の改良も難しいことから、非常に残念ながら、2017 年 7 月のリリースから、JavaScript をメインテナンス モードへ移行して Python と C++のみのサポートにする決定がされたようです。

これにともなって、現在お使いいただける Fusion 360では、スクリプトやアドインの新規作成時に利用する 「スクリプトまたはアドインを新規作成」ダイアログからは選択可能なプログラム言語項から JavaScript のみが削除されています。

Screenshot of a software interface for creating a new script or plugin, displaying fields for programming language selection, script name, description, author, target operating system, and file location.

同様に、Fusion 360 の基本設定の 一般 >> API の「~既定の言語」項からも、JavaScript が削除されています。

Screenshot of a software interface showing programming language options, with selections for Python, JavaScript, and C++ highlighted. The top section displays options in Japanese, and the bottom section shows the interface after a change.

なお、この JavaScript サポートのメインテナンス モードへの移行後も、既に作成済の JavaScript コードが利用出来なくなるわけではありません。既存のコードは [スクリプトとアドイン] ダイアログの ボタンからスクリプト、ないしはアドインを追加して実行することが可能です。

A computer interface showing a window for scripts and add-ins, with options like 'My Scripts' and sample scripts. The interface includes a plus sign icon indicating the addition of new scripts.

By Toshiaki Isezaki 

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading