ActiveUIDocument Property


Provides access to an object that represents the currently active project.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 24.0.0.0 (24.0.0.0)

Syntax

C#
public virtual UIDocument ActiveUIDocument { get; }
Visual Basic
Public Overridable ReadOnly Property ActiveUIDocument As UIDocument
	Get
Visual C++
public:
virtual property UIDocument^ ActiveUIDocument {
	UIDocument^ get ();
}

Remarks

External API commands can access this property in read-only mode only! The ability to modify the property is reserved for future implementations.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsInvalidOperationExceptionThrown when attempting to modify the property.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →