I’m looking for the pyrevit method that give this “old school” result :
DCs = DB.FilteredElementCollector(doc).OfCategory(DB.BuiltInCategory.OST_DuctCurves).WhereElementIsElementType().ToElements()
I know there is this one : DCs = get_family(‘DB.BuiltInCategory.OST_DuctCurves’, doc=doc) but it gives me the Instances and I want the Types.
You’re probably looking for get_types_by_class.
But you have to give that a class of MEPCurveType as that is what a DuctType returns.
Then you would have to filter DuctType by category from that list as you’ll have more than you want.
I’d stick with your simple OfCategory filter as it is more direct.
I understand now I was searching get_types_by_categories but it doesn’t exist. I just try to use the new pyrevit functions but it will works with the other code.
Thank you for you answer.