Hi,
I used one of Konrad’s scripts along with the built in category described above to collect all profiles in the project.
I only post so that people like me (who are a total NOOB to python) can get this functionality.
Cheers,
Mark
# Copyright(c) 2017, Konrad K Sobon
# @arch_laboratory, http://archi-lab.net
#MA just changed cat list to include profiles...
import clr
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
# Import RevitAPI
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
import System
from System import Array
from System.Collections.Generic import *
import sys
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)
try:
errorReport = None
cat_list = [BuiltInCategory.OST_ProfileFamilies]
typed_list = List[BuiltInCategory](cat_list)
filter = ElementMulticategoryFilter(typed_list)
output = FilteredElementCollector(doc).WherePasses(filter).ToElements()
except:
# if error occurs anywhere in the process catch it
import traceback
errorReport = traceback.format_exc()
# Assign your output to the OUT variable
if None == errorReport:
OUT = output
else:
OUT = errorReport