Selecting all tag categories

Is there an easy way for selecting all tag categories? I need them as input for “Element in view by category” node.

First I wanted to select them 1 by 1 and make a list. (see pic.) but I found out there are 101 different tag categories >.<

so I tried the following:

But the “Element in view by category” won’t take that list as input.

Any1 has a smart idea?

thanks in advance!

There is a node called Collect All Tags in Project in Bakery. You can open it (by double-clicking on it) to see how it’s build…

Put this in a python code block and put it between your nodes like in the picture and it should work:

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

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument
categories = doc.Settings.Categories

cats = IN[0]
listout = []

for cat in cats:
	tempcat = categories.get_Item(cat)
	listout.append(tempcat)
		

OUT = listout

2 Likes

Thank you :+1:

How can I get the below node?
“Docuent.BuiltInCategories” “Manage.RemoveNulls” “Elements in view by category”

1 Like