For an export add-in on revit 2014, I need to get all building elements in the opened project.
To get elements, I am currently using a logicalfilter :
new LogicalOrFilter(new ElementIsElementTypeFilter(true),new ElementIsElementTypeFilter(false));
then I parse them using some filters on category ID, using Element.Category.Id.IntegerValue to compare it with every elements in my arrays.
I can get all elements, but some parameters are missing:
- How many elements of this type do I have? (like N doors).
- Which unity should I use (m2, m3, m, kg, etc.)
- Which materials are in this element? (I know I can get element's materialIds using the GetMaterialIds() method, but it seems like it returns only some materials, not all of them)
also, when I get elements, some elements doesn't have name, or a meaningless name like "300x75", not the element name (Wood Door for example).