Interface IRevitContext
This class will keep track of Revit UI events to always have the current Autodesk.Revit.DB.Document, Autodesk.Revit.ApplicationServices.Application, UIDocument, and UIApplication
Namespace: Onbox.Revit.V8
Assembly: Onbox.Revit.dll
Syntax
public interface IRevitContext
Methods
| Improve this Doc View SourceGetApplication()
Gets the current Revit Application
Declaration
Application GetApplication()
Returns
Type | Description |
---|---|
Autodesk.Revit.ApplicationServices.Application |
GetDocument()
Gets the current Revit Document
Declaration
Document GetDocument()
Returns
Type | Description |
---|---|
Autodesk.Revit.DB.Document |
GetUIApplication()
Gets the current Revit UI Application
Declaration
UIApplication GetUIApplication()
Returns
Type | Description |
---|---|
Autodesk.Revit.UI.UIApplication |
GetUIDocument()
Gets the current Revit UIDocument
Declaration
UIDocument GetUIDocument()
Returns
Type | Description |
---|---|
Autodesk.Revit.UI.UIDocument |
HookupRevitEvents(UIControlledApplication)
Hooks up Revit Events to the context
Declaration
void HookupRevitEvents(UIControlledApplication application)
Parameters
Type | Name | Description |
---|---|---|
Autodesk.Revit.UI.UIControlledApplication | application |
IsInRevitContext()
Identifies if Revit is in the current context (Revit API context)
Declaration
bool IsInRevitContext()
Returns
Type | Description |
---|---|
System.Boolean |
UnhookRevitEvents(UIControlledApplication)
Unhooks Revit Events to the context
Declaration
void UnhookRevitEvents(UIControlledApplication application)
Parameters
Type | Name | Description |
---|---|---|
Autodesk.Revit.UI.UIControlledApplication | application |