There are quite a few events supported by the Revit API. You can turn events on and off from the ribbon if you like. Another topic that we will discuss in this recipe is how to override standard Revit commands. This is handy when you might need to disable a feature entirely for your users.
Anytime you want to enable an event in your application, you must first subscribe to the event and tell Revit what you want it to do when that event occurs. In this recipe, we will learn how to subscribe to the
DocumentOpened event as well as how to unsubscribe to it when the Revit session closes.
Don't forget to edit the
.addin file with this new
DBApplicationEvents application so we can launch ...