O'Reilly logo

Instant Autodesk Revit 2013 Customization with .NET How-to by Don Rudder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Subscribing and unsubscribing to events (Should know)

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.

Getting ready

Don't forget to edit the .addin file with this new DBApplicationEvents application so we can launch ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required