I would like to know if you can help me with this error, I want to filter rooms, but I get this warning and I have not been able to decipher the problem, thank you for your help. thanks.
@ingjaidenrincon Add this reference
clr.AddReference("RevitAPI") import Autodesk from Autodesk.Revit.DB import *
As @AmolShah pointed out you haven’t brought the relevant section of the Revit API into the Dynamo Python environment, and as such your code doesn’t know what you mean by FilteredElementCollector.
You can learn more about imports here: 3.2 Boilerplate Setup Code - Dynamo Python Primer
Revit Boilerplate (Annotated) tab of the code section to learn more about what each line does.
I would recommend using
from Autodesk.Revit.DB import FilteredElementCollector if this is all the code you want to use; this will make things run faster as noted at the end of the page I linked.