简体   繁体   中英

Intersection of parameter sets in Revit-Api

I'm trying to explore Quick, Slow and LINQ filter in Revit API using Python. So I decided to create universal filter to any category by filtering parameters values or Family/Category/Symbol.

Now I have a set of elements of different categories (Walls, Floors, Family Symbols, ect) came from the FilteredElementCollector(document) and I need to get all parameters that are in any element in collection. In other words intersection of parameter sets. It would be perfect if it will be possible to make such filter without using LINQ

uidoc = __revit__.ActiveUIDocument
doc = uidoc.Document

collector = FilteredElementCollector(doc)

list_of_categories = [
    ElementCategoryFilter(BuiltInCategory.OST_StructuralColumns),
    ElementCategoryFilter(BuiltInCategory.OST_Walls),
    ElementCategoryFilter(BuiltInCategory.OST_Floors)
]

logical_filter = LogicalOrFilter(list_of_categories)
collector.WherePasses(logical_filter)

Thanks for any ideas

From what you describe, it sounds to me more like a union of parameter sets than an intersection. You might want to check out the parameter analysis and handling functionality that I implemented for RvtMetaProp , a Revit C# .NET add-in to import and store meta properties created in Forge .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM