Get all categories, how?

Hello,

I want just get all categories by Name and filtered by discipline (f.e. all architecture Categories).
How can i match this?
Call i a name or a title of category?

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

clr.AddReference("RevitNodes")
import Revit

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

doc = DocumentManager.Instance.CurrentDBDocument
cat = doc.Settings.Categories
Nam = []

for i in cat:
	Nam.append(i.Category.Name)
	
OUT = Nam

Does not find category :frowning:

KR

Andreas


2022-02-22_17h52_41
2022-02-23_08h36_44

	Nam.append(i.Name)

how easy … :slight_smile:

1 Like