hello,
I’m using Levels -> All Elements at Level node to get all the objects on certain level only.
Is there a way to filter out only the walls out of the entire list?
Thanks!
hello,
I’m using Levels -> All Elements at Level node to get all the objects on certain level only.
Is there a way to filter out only the walls out of the entire list?
Thanks!
Sickkkkkk thank you for the fast response.
I def prefer archilab route. I am planning to have a somewhat dense script. do you think archilab route will be faster? thanks!
Yes, I believe that it would be a little faster than the OOTB route.
Also, in case if you are planning to reduce your package dependency, you can use this code by Konrad from GeniusLoci.
#Copyright(c) 2014, Konrad K Sobon
# Grimshaw Architects, http://grimshaw-architects.com/
# Archi-lab, http://wwww.archi-lab.net
# Default imports
import clr
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
#Import Collections
from System.Collections.Generic import *
import System
def tolist(x):
if hasattr(x,'__iter__'): return x
else : return [x]
levelInput = tolist(UnwrapElement(IN[0]))
cats = tolist(IN[1])
catlist = []
for cat in cats:
bic = System.Enum.ToObject(BuiltInCategory, cat.Id)
for levelIn in levelInput :
doc=levelIn.Document
levelFilter = ElementLevelFilter(levelIn.Id)
catlist.append(FilteredElementCollector(doc).WherePasses(levelFilter).OfCategory(bic).ToElements())
if not isinstance(IN[0], list) and not isinstance(IN[1], list): OUT = catlist[0]
else: OUT = catlist