Is it possible to retrieve all elements from file, and not be depending on type or category? I am looking for Document.AllElements from Archi-Lab, but can find the node
you can do the job via python
import clr
clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import FilteredElementCollector
# 0ļøā£ Get the active document
doc = DocumentManager.Instance.CurrentDBDocument
# 2ļøā£ Collect all elements in the document
all_elements = FilteredElementCollector(doc).WhereElementIsNotElementType().ToElements()
# 3ļøā£ Output the result
OUT = all_elements
First, you need to understand what an āelementā is in Revit terms and if thatās really what you want. In Revit, āelementā just refers to anything using the Element base class - which is most objects you can interact with. This isnāt just walls, floors, and pieces of equipment. Elements includes things like rooms, views, links, parameters, worksets, and tons of other various object types.
I assume that you, like most people, are after the model elements specifically - the physical elements that make up the 3D model. Thereās no single method for getting all those objects, but a FilteredElementCollector
is usually the way to go. You could use a collector to get all the FamilyInstances
of loadable families and then youād need separate collectors for the instances of the system families.