Hi all, am i doing something silly here?
Im just trying to find the items that are ‘Air Terminals’. They are all air terminals, so why do i get ‘false’?
Thanks for help
Hi all, am i doing something silly here?
Im just trying to find the items that are ‘Air Terminals’. They are all air terminals, so why do i get ‘false’?
Thanks for help
Since you are comparing string values, use List.Contains instead of equal node.
Try using String.Contains
@johnbim ,
intresting with designscript it works…
import clr
import sys
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
# 1️⃣referenced docs
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
# 2️⃣ collector
collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_PipeCurves)
all_pipes = collector.WhereElementIsNotElementType().ToElements()
# 3️⃣ Categories
cat = [i.Category.Name for i in all_pipes]
OUT = all_pipes, cat
#✅End
KR
Andreas
What is the error you are getting with the string contains node?
Ice changed the structure of my whole script to avoid this problem. Thanks guys for the help anyway.