Equal Element Categories Return False

Hey, I got a code in which I compare elements category to a floor category in order to filter and get the floor but I am getting “False” for all the elements despite there being a floor category…
Any idea why this is happening?

I have always found with comparing categories, that converting to strings is the way.

I believe the == in Dynamo isn’t able to do a comparison to objects of the type Revit.Elements.Category.

1 Like

Is there a way to compare by the element type? Just wondering if there is a more elegent way to extract it otherwise I’ll have to do with the string solution :slight_smile:

another way could be something here…

2 Likes

Looks good, thanks!

1 Like