From the course: Revit: Creating C# Plugins
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Customizing the user interface
From the course: Revit: Creating C# Plugins
Customizing the user interface
- [Instructor] Now that we have implemented the IExternalApplication interface let's go ahead and start customizing the UI. I currently have the Visual Studio exercise file open for this video. This is where we left off from the last video. We've implemented the OnShutdown and OnStartup methods. However, both of these are currently throwing acceptions. So let's start by fixing these up. The Onshutdown method will be called when Revit is shutting down. As we don't really need anything to occur in this event, let's simply return a successful result. So return Result.Succeeded. In the Onstartup method is where we can create a new ribbon element. So, let's start by removing the acception and adding the new ribbon element. To do that we need to access the UIControlledApplication object that is passed to the method when Revit boots up. So, let's access application, and then from within here we can add a tab by using the CreateRibbonTab method. This simply takes a string for the name for the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.