ControlledApplication 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
SystemObject
  Autodesk.Revit.ApplicationServicesControlledApplication

Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public class ControlledApplication

The ControlledApplication type exposes the following members.

Properties
 NameDescription
Public propertyActiveAddInId 
Public propertyAllUsersAddinsLocation Add-ins location for all users.
Public propertyCities 
Public propertyCreate 
Public propertyCurrentUserAddinsLocation Add-ins location for current user.
Public propertyCurrentUsersAddinsDataFolderPathPath to AddinsData folder for the current user.
Public propertyCurrentUsersDataFolderPathPath to data folder for the current user.
Public propertyIsLateAddinLoading 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 propertyLanguage 
Public propertyProduct 
Public propertyRecordingJournalFilename Retrieve the name of the journal file that Revit is currently recording to.
Public propertySharedComponentsLocation Location of shared components used by Revit.
Public propertySharedParametersFilename 
Public propertySubVersionNumberThe minor version number of Revit.
Public propertyVersionBuild 
Public propertyVersionName 
Public propertyVersionNumber 
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodStatic memberGetFailureDefinitionRegistry Returns the instance of FailureDefinitionRegistry.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetLibraryPaths Returns path information identifying where Revit searches for content.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsJournalPlaying Determines if the application is currently in journal playback mode.
Public methodOpenSharedParameterFile 
Public methodStatic memberRegisterFailuresProcessor Registers Revit application-wide instance of Failures Processor.
Public methodSetLibraryPaths 
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodWriteJournalComment Writes a comment to the Revit journal file
Top
Events
 NameDescription
Public eventApplicationInitialized Subscribe to this event to get notified after the Revit application has been initialized.
Public eventDocumentChanged Subscribe to the FailuresProcessingEvent event to be notified when Revit document has changed.
Public eventDocumentClosed Subscribe to the DocumentClosing event to be notified when Revit is just about to close a document.
Public eventDocumentClosing Subscribe to the DocumentClosing event to be notified when Revit is just about to close a document.
Public eventDocumentCreated Subscribe to the DocumentCreated event to be notified immediately after Revit has finished creating a new document.
Public eventDocumentCreating Subscribe to the DocumentCreating event to be notified when Revit is just about to create a new document.
Public eventDocumentOpened Subscribe to the DocumentOpened event to be notified immediately after Revit has finished opening a document.
Public eventDocumentOpening Subscribe to the DocumentOpening event to be notified when Revit is just about to open a document.
Public eventDocumentPrinted Subscribe to the DocumentPrinted event to be notified immediately after Revit has finished printing a view or ViewSet of the document.
Public eventDocumentPrinting Subscribe to the DocumentPrinting event to be notified when Revit is just about to print a view or ViewSet of the document.
Public eventDocumentReloadedLatest Subscribe to the DocumentReloadedLatestEventArgs event to be notified immediately after Revit has finished reloading a document with central model.
Public eventDocumentReloadingLatest Subscribe to the DocumentReloadingLatestEventArgs event to be notified when Revit is just about to reload latest changes from a central model.
Public eventDocumentSaved Subscribe to the DocumentSaved event to be notified immediately after Revit has finished saving a document.
Public eventDocumentSavedAs Subscribe to the DocumentSavedAs event to be notified immediately after Revit has finished saving document with a new file name.
Public eventDocumentSaving Subscribe to the DocumentSaving event to be notified when Revit is just about to save a document.
Public eventDocumentSavingAs Subscribe to the DocumentSavingAs event to be notified when Revit is just about to save the document with a new file name.

This event is raised when Revit is just about to save the document with a new file name. Note that the first save of a newly created document will raise DocumentSavingAs rather than DocumentSaving event.

Handlers of this event are permitted to make modifications to any document (including the active document), except for documents that are currently in read-only mode.

This event is cancellable, except when it is raised during close of the application. Check the 'Cancellable' property of event's argument to see whether it is cancellable or not. When it is cancellable, call the 'Cancel()' method of event's argument to cancel it. Your application is responsible for providing feedback to the user about the reason for the cancellation.

The following API functions are not available for the current document during this event:

Exception InvalidOperationException will be thrown if any of the above methods is called during this event.

Another event DocumentSavedAs will be raised immediately after the document has been saved with a new file name.

Public eventDocumentSynchronizedWithCentral Subscribe to the DocumentSynchronizedWithCentral event to be notified immediately after Revit has finished synchronizing a document with central model.
Public eventDocumentSynchronizingWithCentral Subscribe to the DocumentSynchronizingWithCentral event to be notified when Revit is just about to synchronize a document with central model.
Public eventElementTypeDuplicated Subscribe to the ElementTypeDuplicated event to be notified immediately after Revit has finished duplicating an element type.
Public eventElementTypeDuplicating Subscribe to the ElementTypeDuplicating event to be notified when Revit is just about to duplicate an element type.
Public eventFailuresProcessing Subscribe to the FailuresProcessing event to be notified when failures are being processed at the end of transaction.
Public eventFamilyLoadedIntoDocument Subscribe to the FamilyLoadedInto event to be notified after Revit loaded a family into a document.
Public eventFamilyLoadingIntoDocument Subscribe to the FamilyLoadingInto event to be notified when Revit is just about to load a family into a document.
Public eventFileExported Subscribe to the FileExported event to be notified immediately after Revit has finished exporting files of formats supported by the API.
Public eventFileExporting Subscribe to the FileExporting event to be notified when Revit is just about to export files of formats supported by the API.
Public eventFileImported Subscribe to the FileImported event to be notified immediately after Revit has finished importing a file of format supported by the API.
Public eventFileImporting Subscribe to the FileImporting event to be notified when Revit is just about to import a file of format supported by the API.
Public eventLinkedResourceOpened Subscribe to the LinkedResourceOpened event to be notified immediately after Revit has finished opening a linked resource.
Public eventLinkedResourceOpening Subscribe to the LinkedResourceOpening event to be notified when Revit is just about to open a linked resource.
Public eventProgressChanged Subscribe to the ProgressChanged event to be notified when an operation in Revit has progress bar data available.
Public eventViewPrinted Subscribe to the ViewPrinted event to be notified immediately after Revit has finished printing a view of the document.
Public eventViewPrinting Subscribe to the ViewPrinting event to be notified when Revit is just about to print a view of the document.
Public eventWorksharedOperationProgressChanged # Subscribe to the WorksharedOperationProgressChanged to be notified when progress has changed during Collaboration for Revit's workshared operations: open model and synchronize with central.
Top
See Also