The Autodesk.Revit.UI.UIDocument is a class in the Revit API that represents a document in the Revit user interface (UI). It provides access to the elements that make up the document, the views that display them, and the parameters that define their characteristics.
The UIDocument class has several properties that allow you to access information about the document, including:
The UIDocument class also contains methods that allow you to interact with the document, including:
The UIDocument class also defines several events that allow you to respond to changes in the document, including:
To use the UIDocument class, you need to create an instance of the Autodesk.Revit.UI.UIDocument class and pass it a reference to the current Revit document. You can then use the properties and methods of the class to interact with the document and its elements.
UIDocument uiDocument = new UIDocument(document);
The Autodesk.Revit.UI.UIDocument class is an essential part of the Revit API, allowing developers to programmatically access and manipulate the elements and views in a Revit document. Its properties, methods, and events provide a powerful set of tools for creating custom Revit applications and workflows.