Comparing all Categories to a list

Hello

i have a problem that i dont know how to start solving, i need to assign a specific value in a project parameter based on the categories of elements in the model (like floors: Z01, Walls: Z02 …etc.).

my trail of thought is this, i need to compare the category list from the model with the category list in the excel sheet then get all elements of the categories, then assign the value based on the category.
is this correct?

and if so; i got this far:

why is it giving me false in all values?!

Hello…looks like you compare categori against string…

1 Like

ah! thank you for your comment!

i added the “string from Object” node
here is what i got:

could you please tell me why im still getting false for the rest!?

HI…have tried to take index 0 from list transpose, anyway i would use index of for that task

Hello
check your level :wink:

1 Like

Thank you!
it seems though that “==” node is the wrong node to be used here, since it will check the value and the index, (as you can see i Walls is at index 3 in the first list but is at 4 in the second)

what i want is a node that checks the values (categories) from the first list and see if they exist in the excel file.

(im a noob so please bear with me :P)

@NERDASORUS I would suggest looking into dictionary.

3 Likes

so sorry for late replay,

do you see the transpose list:
image

what i want is to assign the values in the 2nd list (green circle) to a parameter (that was already created) for every element of the categories (red circle).

@NERDASORUS Try something like this:

1 Like