Is it possible to dynamically add commands after IExternalApplication.OnStartup
has executed to Revit's Ribbon Panel?
I came across this post on TheBuildingCoder... http://thebuildingcoder.typepad.com/blog/2010/03/adding-noncommands-to-the-revit-ribbon.html
.. and the first "P.S." on there seems to imply that it's not possible, but that was back in 2010. I'm wondering if anything has changed?
I haven't been able to figure it out myself. Trying to just execute the AddPushButton()
code that I've written results in:
An unhandled exception of type System.Runtime.InteropServices.SEHException' occurred in RevitAPIUI.dll
It works fine when placed inside the IExternalApplication.OnStartup
block, which seems to imply that I either need to execute the code to add to the Ribbon panel in some sort of Transaction pattern or similar... or, it's just not possible :(
Any help would be appreciated, thank you!