Skip to content

ControlledApplication

Public Class

Represents the Autodesk Revit Application with no access to documents. It provides options and other application wide data and settings for external applications OnStartup/OnShutdown.

Inheritance Hierarchy

System.Object
Autodesk.Revit.ApplicationServices.ControlledApplication

Namespace: Autodesk.Revit.ApplicationServices

Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public class ControlledApplication

The ControlledApplication type exposes the following members.

Properties

Name

Description


Public Property
ActiveAddInId

Retrieves the Id of the currently running external application.


Public Property

The folder location for .addin files for all users.


Public Property
Code Example
Cities

Returns a set of all the known city locations within Revit.


Public Property
Create

Provides an object that can be used to create new instances of Autodesk Revit API objects.


Public Property

The folder location for .addin files for the current user.


Public Property
CurrentUsersAddinsDataFolderPath

Path to AddinsData folder for the current user.


Public Property
CurrentUsersDataFolderPath

Path to data folder for the current user.


Public Property

Indicates whether this add-in is loaded on the fly or not. If it is loaded when is Revit starting up, it is false, otherwise it should be true.


Public Property
Language

The language used in the current session of Revit.


Public Property

The product type for the current session of Revit.


Public Property
RecordingJournalFilename

Retrieve the name of the journal file the Revit is currently recording to.


Public Property
SharedParametersFilename

Contains the fully qualified path to a shared parameters file.


Public Property
SubVersionNumber

The minor version number of Revit


Public Property
VersionBuild

Returns the internal build number of the Autodesk Revit application.


Public Property
VersionName

Returns the name of the Revit application.


Public Property
VersionNumber

Return the primary version of the Revit application.


Methods

Name

Description


Public Method

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)


Public Method
Static Member

Returns the instance of FailureDefinitionRegistry.


Public Method

GetHashCode

Serves as the default hash function.
(Inherited from Object)


Public Method
Code Example
GetLibraryPaths

Returns path information identifying where Revit searches for content.


Public Method

GetType

Gets the Type of the current instance.
(Inherited from Object)


Public Method
IsJournalPlaying

Determines if the application is currently in journal playback mode.


Public Method
OpenSharedParameterFile

Enables access to shared parameter groups and definitions that are maintained on disk.


Public Method
Static Member
RegisterFailuresProcessor

Replaces Revit’s default user interface (if present) with alternative handling for all warnings and errors (including those not generated by your application) for the rest of the Revit session; if your application is not prepared to respond to all warnings and errors, consider use of IFailuresPreprocessor (in your opened Transaction) or the FailuresProcessing event instead of this interface.


Public Method
SetLibraryPaths

Sets path information identifying where Revit searches for content.


Public Method

ToString

Returns a string that represents the current object.
(Inherited from Object)


Public Method

Writes a comment to the Revit journal file.


Events

Name

Description


Public Event
ApplicationInitialized

Subscribe to this event to get notified after the Revit application has been initialized


Public Event
DocumentChanged

Subscribe to the DocumentChanged event to be notified when Revit document has changed.


Public Event
DocumentClosed

Subscribe to the DocumentClosing event to be notified when Revit is just about to close a document.


Public Event
DocumentClosing

Subscribe to the DocumentClosing event to be notified when Revit is just about to close a document.


Public Event
DocumentCreated

Subscribe to the DocumentCreated event to be notified immediately after Revit has finished creating a new document.


Public Event
DocumentCreating

Subscribe to the DocumentCreating event to be notified when Revit is just about to create a new document.


Public Event
Code Example
DocumentOpened

Subscribe to the DocumentOpened event to be notified immediately after Revit has finished opening a document.


Public Event
DocumentOpening

Subscribe to the DocumentOpening event to be notified when Revit is just about to open a document.


Public Event
Code Example
DocumentPrinted

Subscribe to the DocumentPrinted event to be notified immediately after Revit has finished printing a view or ViewSet of the document.


Public Event
Code Example
DocumentPrinting

Subscribe to the DocumentPrinting event to be notified when Revit is just about to print a view or ViewSet of the document.


Public Event
DocumentReloadedLatest

Subscribe to the DocumentReloadedLatestEventArgs event to be notified immediately after Revit has finished reloading a document with central model.


Public Event
DocumentReloadingLatest

Subscribe to the DocumentReloadingLatestEventArgs event to be notified when Revit is just about to reload latest changes from a central model.


Public Event
DocumentSaved

Subscribe to the DocumentSaved event to be notified immediately after Revit has finished saving a document.


Public Event
DocumentSavedAs

Subscribe to the DocumentSavedAs event to be notified immediately after Revit has finished saving document with a new file name.


Public Event
DocumentSaving

Subscribe to the DocumentSaving event to be notified when Revit is just about to save a document.


Public Event
Code Example
DocumentSavingAs

Subscribe to the DocumentSavingAs event to be notified when Revit is just about to save the document with a new file name.


Public Event
DocumentSynchronizedWithCentral

Subscribe to the DocumentSynchronizedWithCentral event to be notified immediately after Revit has finished synchronizing a document with central model.


Public Event
DocumentSynchronizingWithCentral

Subscribe to the DocumentSynchronizingWithCentral event to be notified when Revit is just about to synchronize a document with central model.


Public Event
ElementTypeDuplicated

Subscribe to the ElementTypeDuplicated event to be notified immediately after Revit has finished duplicating an element type.


Public Event
ElementTypeDuplicating

Subscribe to the ElementTypeDuplicating event to be notified when Revit is just about to duplicate an element type.


Public Event
Code Example
FailuresProcessing

Subscribe to the FailuresProcessing event to be notified when failures are being processed at the end of transaction.


Public Event
FamilyLoadedIntoDocument

Subscribe to the FamilyLoadedInto event to be notified after Revit loaded a family into a document.


Public Event
FamilyLoadingIntoDocument

Subscribe to the FamilyLoadingInto event to be notified when Revit is just about to load a family into a document.


Public Event
FileExported

Subscribe to the FileExported event to be notified immediately after Revit has finished exporting files of formats supported by the API.


Public Event
FileExporting

Subscribe to the FileExporting event to be notified when Revit is just about to export files of formats supported by the API.


Public Event
FileImported

Subscribe to the FileImported event to be notified immediately after Revit has finished importing a file of format supported by the API.


Public Event
FileImporting

Subscribe to the FileImporting event to be notified when Revit is just about to import a file of format supported by the API.


Public Event
LinkedResourceOpened

Subscribe to the LinkedResourceOpened event to be notified immediately after Revit has finished opening a linked resource.


Public Event
LinkedResourceOpening

Subscribe to the LinkedResourceOpening event to be notified when Revit is just about to open a linked resource.


Public Event
ProgressChanged

Subscribe to the ProgressChanged event to be notified when an operation in Revit has progress bar data available.


Public Event
Code Example
ViewPrinted

Subscribe to the ViewPrinted event to be notified immediately after Revit has finished printing a view of the document.


Public Event
Code Example
ViewPrinting

Subscribe to the ViewPrinting event to be notified when Revit is just about to print a view of the document.


Public Event
WorksharedOperationProgressChanged

Subscribe to the WorksharedOperationProgressChanged to be notified when progress has changed during Collaboration for Revit’s workshared operations: open model and synchronize with central.