Get Category problem for a few categories

I’am noticing strange behavior while getting the category of an element type of a few categories as shown in the picture. Does anybody know what is wrong here? Get_Revit_Category_problem

I am not sure to fully get what you mean. Could you describe your issue more accurately?

As you can see in the picture I cannot retrieve the Revit Category Value of e.g. a Revit Profile (Element Type) by using get Parameter Value Nodes. But I can retrieve the Parameter with Element.Parameters or ParameterByName. But if I want to retrieve the Value of the Parameter with a Parameter.Value node, it is kind of empty, but it does have a value… So the same strange output as with the Get Parameter Value Nodes.

All this is very strange. And you can see this behavior on the all of the 19 Categories in the Expandable Watch Window. Not with all the other Categories.
Most of the buggy ones are not relevant for me, but Profiles, Stacked Walls and Wall-Reveals are.

I should be able to get the Profile Category Value in all of these cases.
But the only Node that does work is the Element.GetCategory Node.

This could give you some clues:

Thanks for the feedback Yna_Db.
There is definitely something strange going on.
And still native nodes don’t do what they should / what you expect.
So I must make a workaround for these Revit Categories.

Hi @T_V_werk,

Strange indeed.
It also seems like you can’t select profiles, based on their category.

Kind regards,
Mark

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