Creating a loop to select indices one by one and then replace

I’ve created a new shared parameter called “location” to place the room names which are connected to each specific door. It works well when dealing with one door per room, but it gets tricky when there’s more than one door to a single space.

In this case, I need to introduce a copy of the value for both index (4 & 5), which is easy to do, but it gets harder to solve if the case was index 4 and 7, or even if there were more than 2 rooms with more than 1 door connected to it. Question is, how do I replace the required values in a single list in the place I need them (right after the original index and being followed by the other items on the list as they were laid originally)?

What is it exactly that you’re wanting to do with this information? Doors already have properties for the rooms they connect as well as the room they’re “in”.
image

The main purpose is to automatically place the information on a schedule (of the rooms that surround the door), so that it’s not only the door tag, the one you can use to find the door in the floor plan, but also the rooms that it “connects”.

image

Why not use the “To Room” and “From Room” parameters that already exist in Revit? You can set these up to be a combined parameters if you want the single column “from x to y” formatting.

3 Likes