Reading category from String

How to select elements or categories from a string of data?

Hi,

Have you tried to use the Category.ByName node ?

As mellouze said use this node :

image

Cheers

it showing null

Yes because i think your input is not a string

Pls show the left part of the script. In Flatten node it may be Category objects. If it’s so then use the '“StringFromObject” node

i am trying to read category names from excel

And what does the little yellow warning say ?

it says " Warning: Category.ByName operation failed.
The selected category is not valid in this document."

Is your Revit version in English ? Mine is in French and I have to write the Category name in French, just like Matthieu did.

You also want to check if you did not forget any “s” at the end of the category name. In French it’s “Portes” and “Murs”.

oh yes i got it :smiley: i have to use plural it think. let me check

Yes check the name of the categories in the “Category” node. Maybe it lacks an “s” or somenting at the end

Yes i got it. Thank you MathieuD and Mellouze.
Cheers

1 Like