UIControlledApplication
Description:
Represents the Autodesk Revit user interface, providing access to UI customization methods and events.
Represents the Autodesk Revit user interface, providing access to UI customization methods and events.
Remarks:
This class does not provide access to documents because it is provided to you through the ExternalApplication OnStartup()/OnShutdown() methods, and those methods are when it is not possible to work with Revit documents. You can work with documents by getting them from the UIApplication class; that class is obtained from events and ExternalCommand callbacks.
This class does not provide access to documents because it is provided to you through the ExternalApplication OnStartup()/OnShutdown() methods, and those methods are when it is not possible to work with Revit documents. You can work with documents by getting them from the UIApplication class; that class is obtained from events and ExternalCommand callbacks.
public class UIControlledApplication
| Name | Return Type | Description |
|---|---|---|
| ApplicationClosing | event | Subscribe to the ApplicationClosing event to be notified when the Revit application is just about to be closed. |
| DialogBoxShowing | event | Subscribe to the DialogBoxShowing event to be notified when Revit is just about to show a dialog box or a message box. |
| DisplayingOptionsDialog | event | Subscribe to the options dialog displaying event to be notified when Revit options dialog is displaying. |
| DockableFrameFocusChanged | event | Subscribe to this event to be notified when a Revit GenericDockableFrame has gained focus or lost focus in the Revit user interface. This event is called only for API-created GenericDockableFrames. |
| DockableFrameVisibilityChanged | event | Subscribe to this event to be notified when a Revit GenericDockableFrame has been shown or hidden in the Revit user interface. This event is called only for API-created GenericDockableFrames. |
| FabricationPartBrowserChanged | event | Subscribe to MEP Fabrication part browser changed event to be notified when MEP Fabrication part browser is updated. |
| FormulaEditing | event | Subscribe to the FormulaEditing event to be notified when the edit formula button has been clicked. |
| Idling | event | Subscribe to the Idling event to be notified when Revit is not in an active tool or transaction. |
| TransferredProjectStandards | event | Subscribe to the TransferredProjectStandards event to be notified after the scope of a Transfer Project Standards operation has been finalized. |
| TransferringProjectStandards | event | Subscribe to the TransferringProjectStandards event to be notified before the scope of an impending Transfer Project Standards operation has been finalized in the Transfer Project Standards dialog. |
| ViewActivated | event | Subscribe to the ViewActivated event to be notified immediately after Revit has finished activating a view of a document. |
| ViewActivating | event | Subscribe to the ViewActivating event to be notified when Revit is just about to activate a view of a document. |
| Name | Return Type | Description |
|---|---|---|
| CreateAddInCommandBinding(RevitCommandId) | AddInCommandBinding | Creates a new AddInCommandBinding. |
| CreateRibbonPanel(String) | RibbonPanel | Create a new RibbonPanel on the Add-Ins tab. |
| CreateRibbonPanel(String, String) | RibbonPanel | Create a new RibbonPanel on the specified tab. |
| CreateRibbonPanel(Tab, String) | RibbonPanel | Create a new RibbonPanel on the designated standard Revit tab. |
| CreateRibbonTab(String) | None | Creates a new tab on the Revit user interface. |
| GetDockablePane(DockablePaneId) | DockablePane | Gets a DockablePane object by its ID. |
| GetRibbonPanels() | List<RibbonPanel> | Get all the custom Panels on Add-Ins tab of Revit. |
| GetRibbonPanels(String) | List<RibbonPanel> | Get all the custom Panels on a designated Revit tab. |
| GetRibbonPanels(Tab) | List<RibbonPanel> | Get all the custom Panels on a designated standard Revit tab. |
| LoadAddIn(String) | None | Loads add-ins from the given manifest file. |
| LoadPackageContents(String) | None | Loads add-ins from the given packageContents.xml file. |
| RegisterDockablePane(DockablePaneId, String, IDockablePaneProvider) | None | Adds a new dockable pane to the Revit user interface. |
| RemoveAddInCommandBinding(RevitCommandId) | None | Removes an AddInCommandBinding. |
| Name | Return Type | Description |
|---|---|---|
| ActiveAddInId | AddInId | Get current active external application or external command id. |
| ControlledApplication | ControlledApplication | Returns the database level ControlledApplication represented by this UI-level ControlledApplication. |
| IsLateAddinLoading | bool | Indicates whether this add-in is loaded on the fly or not. If it is loaded when Revit is starting up, it is false, otherwise it should be true. |
| IsViewerModeActive | bool | Determines if Revit session is in Viewer mode. |
| LoadedApplications | ExternalApplicationArray | Returns an array of successfully loaded external applications. |
| MainWindowHandle | IntPtr | Get the handle of the Revit main window. |
| ProductIsRS | bool | Identifies if the current Revit product has an RS designation. Most add-ins will not need to use this information. |