Categories changing to something whenever I open Dynamo file

Hello everyone,

I have bunch of graphs that start with ‘Categories’ node.
Each graph is dedicated to each specific categories.

The problem is everytime I open my Dynamo script, those Categories get changed randomly for some reason. I have around 10-20 graphs so I can’t correct them every time I open it.

Does anyone know why categories change randomly like this? is there a way where I can hardcode each categories so they don’t change?

thank you!

Yeah, dropdowns in older version of Dynamo (before 2.1.0 I believe) only store the integer value of the location. Meaning if you have different categories in another Revit version (or model) it will be wrong.

This video shows some of it and how to workaround it in the future.

6 Likes

Great thank you very much!! I was looking for this!!

hello,

I just recently tried your solution to fix some bugs but im getting this error,

image

just like a node below, I made sure all the spelling is correct. Not sure why Im getting that error.

Thanks!

Do this in a code block instead,

DSCore.Types.FindTypeByNameInAssembly("FilledRegion", "RevitAPI");

2 Likes

hey John ! Thank you for the response - so it seems like it works for Element Type but it doesnt work for Categories

image

What should I tweak in order for it to work?
“sequence contains no matching component” is the error

Thank you!

For Categories, you want to use the node Category.ByName

1 Like

image
so your answer → all elements of Type works but
your answer → all elements of category does not work.

I tried
your answer → category.byname → all elements of category but no good.

Don’t I have to tweak something from the code in order for me to use it for categories??
sorry my knowledge in coding or python is minimal…

thank you very much in advance!

@mixology

2 Likes

Appreciate this thank you!

1 Like