Is there a node/ quick way to get all area instances of type?
Or do I just have to get all elements then filter them?
Imagine a filter after these nodes
Is there a node/ quick way to get all area instances of type?
Or do I just have to get all elements then filter them?
I added a filter
Hi,
here a solution with Python
import clr
import sys
import System
from System.Collections.Generic import List, IList, Dictionary
clr.AddReference("System.Numerics")
#
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
import Autodesk.DesignScript.Geometry as DS
#import Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB
#import transactionManager and DocumentManager (RevitServices is specific to Dynamo)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
input_areaScheme = UnwrapElement(IN[0])
filterScheme = System.Predicate[System.Object](lambda x : x.AreaScheme.Id == input_areaScheme.Id)
allArea = List[DB.Element](FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Areas).WhereElementIsNotElementType().ToElements()).FindAll(filterScheme)
OUT = allArea
OMG… I forgot to unwrap again. No wonder I couldn’t get it to work!
I need a big poster behind my desk saying, “UNWRAP”… Although that could look a little strange to other people.
I know why… I just forget