I have created a list with sublists of Revit elements and I need to compare parameter values within those sublists, so essentially I need a loop that picks the first item of the list then compares parameter values in the elements in that sublist, finds an error, writes in the error parameter and moves on to the next sublist. (I need to check if the parameter valies are consecutive letters)
I’m not sure I exactly follow. But here goes. You want to.
-Check a list of list
-Get parameter from the element of the list of list
-Set that parameters on thoses lists
Where you start with a parameter list of
[ [ A, B ], [ B, A ], [ A, B, E, C, D ] ]
and change the parameters of the elements to
[ [ A, B ], [ A, B ], [ A, B, C, D, E ] ]
So what’s happening if the values aren’t consecutive? You wan’t to set them to the proper letter or just return a boolean or something stating that they are incorrect?
If the values A, B, C, are always refering to the same item, how about making it into a dictionary to create a key to sort your list in the right order?
Easy. Just take the the true/false outputs from my previous image and create an If function. If the character is incorrect (false) write “Error” if everything is ok (true) write "null’ or empty.
I am struggling to understand how those things work.
I have gone trough a large list of doors and collected the toRooms numbers for each door; then i have grouped those that are duplicates, ie where more than one door opens into the same room, and then i want to check if they have the adequate label (seperate parameter to the door called “Door label”) to create the correct door number - ie to room 1 - Doors 1A, Doors 1B ect. (don’t even ask me why the door numbering is set up like this, i have to work with what i’ve got.)
Which part are you struggling with? It sounds like you have your doors grouped by room and you can get their labels. That’s a good start. Can you post an image of your graph?