Writing Categories in Code Block throwing an error

Hello everyone,

I’m using this code block that grabs walls categories.
The reason is, sometimes the value in my Categories node change randomly instead of Walls so I wanted to hard code it.

It seems like this works for all Revit versions EXCEPT 2020

Revit 2020 gives me this error

It’s very weird to me that it only doesn’t work on Revit 2020 dynamo.
Please let me know if you have more question.

Thanks!

Hi @mrkpkimEMSRM,

Can you try with Revit.Elements.Category.ByName("...") instead ?

Hello thanks for the response. Still having an issue

image

Do you have the last Rhythm update ?

I have Rhythm 2021.1.1 version and all Revit versions have the same Rhythm version.
Only on 2020 its acting out.

Im trying to uninstall Rhythm and re install but just keep saying Pending Uninstall and actually not getting rid of it from Revit 2020

hi @mrkpkimEMSRM

Can you upgrade your Revit and Dynamo to the versions below?
I think your problem was solved last hotfix update of Revit 2020.

-biboy

I’m not sure what the cause of your issue is, but an alternate way to avoid using drop-downs would be the ‘Category.ByName’ node which takes a string as input.

1 Like

Try Like this,

a = Revit.Category.ByName("Rooms");
ElementQueries.OfCategory(a);

1 Like