Reloading of External Application functions with AddInManager while Revit is running

sh-watanabe9SVV8
Explorer
Explorer

Reloading of External Application functions with AddInManager while Revit is running

sh-watanabe9SVV8
Explorer
Explorer

It is developed using the AddInManager.
Is there a way to debug the StartUp/Shutdown portion of an external application while Revit is running?

 

Start Revit
 Check the operation
  Change source & build in VisualStudio
   Reload the dll in Add-In Manager
    Check operation (←I want to do this)

0 Likes
Reply
Accepted solutions (1)
486 Views
4 Replies
Replies (4)

Mohamed_Arshad
Advisor
Advisor
Accepted solution

HI @sh-watanabe9SVV8 

What you are excepting is not possible for ExternalApplication, Why because, ExternalApplication will automatically invoke while we start Revit Application and Shutdown when we exit the application. There is Button to trigger the ExternalApplication to Invoke.

 

But we can able to debug ExternalApplication without Add-In Manger. Kindly Follow the steps.

01. Create a ExternalApplication Plugin

02. Create a Manifest File (.addin) and paste in Appdata or ProgramData.

03. Goto Properties in Visual Studio and Select Revit.exe as a External Program.

arshad99_0-1685601638232.png

 

04. Keep a Break Point on Startup Code.

05. Click Start in Visual Studio.

arshad99_1-1685601666910.png


Hope this will helps.

 

Thanks & Regards,
Mohamed Arshad K

ricaun
Advisor
Advisor

I'm pretty sure that the AddInManager does not have this feature, is really tricky to execute IExternalApplication without closing Revit, the trick part is Shutdown, most of the time is empty, and if your application is not unloaded properly you could have duplicate stuff or unwanted Exceptions.

 

The default Revit API does not have methods to unload/remove ribbons in a safe way, I created a library to add some extensions to help that: https://www.nuget.org/packages/ricaun.Revit.UI

 

And I have a plugin that enables load/unload IExternalApplication without the need to reset Revit.

 

 

The other option is like @Mohamed_Arshad mentioned, using the .addin and debug, but you gonna need to restart Revit to reload your addin.

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

sh-watanabe9SVV8
Explorer
Explorer

@ricaun 

Thank you for introducing me to your library.

It's quite impressive that you can make modifications just by building the external application component.

How is this achieved?

 

Also, I noticed that on your web page, it says there's a 15-day trial for the "AppLoader".

Am I correct in understanding this as a paid service?

0 Likes

ricaun
Advisor
Advisor

The plugin is basically doing the same thing Revit does when loading an external application, but instead of startup when Revit starts and shutdown when Revit closes, the plugin is doing this every time the assembly changes.


If in the shutdown every component of the plugin is disabled/removed you can easily startup/shutdown on runtime.

 


@sh-watanabe9SVV8 wrote:

Also, I noticed that on your web page, it says there's a 15-day trial for the "AppLoader".

Am I correct in understanding this as a paid service?


Yes, the idea was to be a paid service/plugin, I scraped the idea and need to change it to be free, at the moment I'm sending some free licenses. If you would like to have one just send me a private message.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes