How can I get the category names from a list of Revit.DB.Category items?

from the UI.MultiInputForm++ I get the chosen Revit categories list, but I need a list of the categories names, because I want to use the node “Springs.Filter.ByCategoryName”.

01_HideAllNotNeededElements_cleaned.dyn (99.3 KB)

Python Node:

image

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager

from System.Collections.Generic import *

cats=IN[0]

list = []

list = x.Name for x in cats

OUT = list

image

solution:

haha

2 Likes