Hi
I’m having trouble with part of my script, i’m trying to compare selected rooms, with the “from room value on doors”.
I have no trouble if i have doors in all the rooms then it works like a charm.
But if i for instance do not have a door in the last rooms it messes up.
It works correctly for the green, blue and orange lines i have drawn for better explaning.
But then the purple is the cullprit, i want it to compare with the yellow also ash this is the correct.
I have tried using the “==” node with cross lacing where i cant get the trues out, but i have a very hard time getting the lists structure back to where it matches the “from room” so i can use it as a mask.
I’m kinda stuck here so any solutions around this would be much appeciated
Can you show us the rest of the graph? A door with no FromRoom value should still return a null, not just disappear. In the last image you posted you specifically remove those doors, which is obviously going to mean that your list lengths are off.
The problems occur when i i remove the door between room D and E, thus leaving room D with no doors. So i’m aware it my list management that is off, but cant seem to find out how to fix it
Instead of filtering out your nulls at the start, is a solution to carry them through, then replace them with false at the end after you’ve checked if the doors match a room?
Where else earlier in the script have you filtered down the list of doors? Should be somewhere that needs either a null or empty list in order to keep the list lengths identical.
Edit: Loaded your file. It crashed my Revit, good thing the problem might be early on so I can just freeze off everything. Check this filtering here, if you adjust it a little you can have it produce an empty list when rooms have no doors so the list of rooms and doors both have 6 indices at that level instead of an unequal 5 for one 6 for the other as it originally did.