3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Revit Add-In Managerを使ってデバッグする方法

Last updated at Posted at 2019-12-07

Add-In Manager とは

Addinファイルなしで、外部コマンドを実行できるアドインツール。Visual Studio の[プロセスにアタッチ]をせず、何回でもビルドしてRevitを起動し直すことなく、外部コマンドの結果を確認することができる。

アドインはRevit SDKに同梱されているので、そこからアドインをコピーし設定する。

Add-In Manager Installation

使ってみた

  1. Revitを単独で起動する。
  2. Revit [アドイン]タブの[外部ツール]から[Add-in Manager (Manual Mode)]を選択する。
  3. [Loaded Commands]タブの[Load]ボタンから、実行したい外部コマンドのアセンブリを登録する。
  4. 表示された外部コマンドのうち、実行したい外部コマンドを指定し[Run]を押すと、コマンドが実行される。
  5. 再度ソースコードを編集しデバッグする場合は、Visual Studioからデバッグを停止し、ソースコードを編集、ビルドし、再度[プロセスにアタッチ]でデバッグを再開する。
  6. その後、Revit [アドイン]タブの[外部ツール]から[Add-in Manager (Manual Mode, Faceless)]を選択することで、再び外部コマンドが実行される。

なぜか外部アプリケーションの実行には使えなかった

上記の手順は、外部コマンドの実行の方法。
外部アプリケーションの実行の方法を探してみたが、[Loaded Applications]タブの[Run]ボタンが押すことができず、結局わからなかった。
ブレークポイントを置いて、F10/F11によるステップインデバッグをする場合には、Visual Studio の[プロセスにアタッチ]をする必要があるため、再ビルドするためには、Revitを閉じる必要がある。

参考

The Building Coder: Debugging an Add-in Without Restarting Revit

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?