Hi,
@pball wrote:
People around here do not like to update the company Addin I manage and I haven't found a simple way to have it auto update. So I finally got around to adding a nag if the addin is out of date. Figured I could also have the addin stop working so people would be more likely to update it. Sadly that nag and time bomb feature will only start working with the next update, assuming people update to this version lol.
As far as I know, Inventor will not mark as "Loaded" if an exception is thrown at the add-in's Activate() to Inventor.
So I think you just throw some exception in Activate() to avoid the actication.
In this case Deactivate() will not be called and so you must release the resources if you have obtained at Activate().
I think it is more friendly that the alert message will be shown when the command is executed, rather than suddenly the add-in disappears.
(When the add-in disappears, you will get many phone calls from every users!!)
And more one thing, even if the add-in has deactivated at OnReady(), users can reactivate it at Addin Manager and the add-in has been marked as loaded (activated).
In this scenario user can execute the command and the trouble may cause if you don't initialize the add-in completely if it is expired.
=====
Freeradical
Hideo Yamada