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.

Accessing the application

Accessing the application

From the course: Revit: Creating C# Plugins

Start my 1-month free trial

Accessing the application

- When accessing Revit via the API, we can do so through the application, which is essentially the Revit session that we're working in, or through the document, which represents a Revit project file that we're working in. This is done through four different objects: the application, the UIApplication, the document, and the UIDocument. An application object provides access to application-wide settings such as project location settings, language, and application events. We'll learn more about this later on. The UIApplication object provides access to the interface or the ribbon and UI properties. We can use this to add custom ribbon items for example, which we'll also learn about later on in the course. The document object refers to the Revit project file that we're working in, so it provides access to all the elements, views and data within a model. We'll use this throughout the course. Finally the UI document provides access to the project-level user interface methods and properties…

Contents