Elements.GetCategory not working

Hi, I am confused to why this is not working where I am trying to select all rooms in a group by selecting model >list.FilterBy Bool Mask. My list is showing all false at the end where clearly there is rooms in that group. Can anyone help me please. Thanks

Use Object.Type to check what kind of output you get from Element.GetCategory.

It probably is not a string, but a Revit.DB.Category element. That is not equal to the string “Rooms”.

Use string from object between Element.GetCategory and ==

Hi Bjorn,
Thanks for replying to my queries. it is indeed not a string but a .category element.
However I do not understand why is the output of the element.getcategory not a string, I thought everything is converted to a string by default when you’re in Dynamo.

Hi jw.vanasselt
Many thanks for your help, it works perfectly for me and have solved the problem.

Hi Marcus,

Good to hear, dont forget to solve the forum :slight_smile: