Sorted excel list to parameters


I have a list of rooms in excel.
But some rooms are doubled in the excel list.
I want to put the persons in the comments of the room, or even beter in extra parameters (pers1, pers2, etc).

This doesn`t seems to be possible with an add-in, so I am trying to do this in Dynamo. But I am struggling quit a lot with dynamo.
So far I have this

Quit shure it is possible in dynamo, but don`t know how to continue. Can anybody help me a bit or give me some tips for this?

thanks in advance!


If I’m understanding you correctly, you have a list of rooms (room name) with the occupancy (number of people), but some rooms show up more than once.

Do the rooms that show up twice have the same occupancy both times or are they different?
If they are different, is this where you have multiple parameters (pers1, pers2, etc)?
If the occupancy is always the same for a room do you need the room to show up twice?

This sounds like it’s definitely doable in Dynamo, we just need a little more information to get started.


the excel list will be like this:

and in every room a different number of people. there are also rooms without people.


Ahhh… I gotcha!
You can definitely create project parameters (Pers1, Pers2, etc.) or you can combine them into a list (Jan, Piet, Klaas,etc) to go in Comments. It depends on what you’re going to do with the data afterwards.


I want to tag the persons in the rooms, or create schedules of the rooms. So I think it doesn`t really matter, but i like it more with the project parameters (Pers1, Pers2, etc.). And at the end, everything needs to be exported to ifc, so the other teammembers can use the model for a kind of facility management.


the excel list are actually generated from fm software and will change every x weeks. And our revit model is used to visualize everything.
I also thought of placing rpc-people families inside the rooms… but that will be the next step maybe.


There are other posts on the forum that explain how to create project parameters. You should be able to follow those and figure that portion out. I’ll help with sorting the parameters and rooms.


thanks you!! that will help me a lot.


This should work, assuming you get the project parameters added.


thanks very much! I will try this out tomorrow.


From a data managemwnt standpoint adding one parameter per room is a nightmare. Doing that would mean that when you want to know where ‘Ingrid’ sits you will have to sort and filter all the parameters to find the one that contains ‘Ingrid’, effectively testing 60 values when you could test 6 by placing the list of people who sit in each room into one parameter.

Better still, you could use a container family to place each person in their respective room. Be sure that room calculation point is turned on in the container family, and you could then schedule every person and sort by the room they are in. This would also allow for adding additional info such as phone number, email, department, all of which could show in the schedule and leveraged as needed. Sounds like a lot of work, but it’s no more than the previous ideas as Dynamo can be used to place the familys into the correct room of the Revit model and set however many parameters you need/want.


@JacobSmall thanks. that is what i should indeed do with sql. Thanks for the tip.
I can still use the script of @Nick_Boyts and instead of updating a family parameter I am placing a rpc container family with calculation point for every person .


@Nick_Boyts I get it almost working:

but I have no idea why index of equals gives me an empty list. Maybe because one list is a list of integers and the othe list are strings?


The wiring is a bit off - list a and list b are backwards. Looks as if there may be others, but I didn’t check too closely.

The object types being different is likely the issue. You can check this using an ‘Object.Type’ node after the lists. Both sets of data should be whatever the room number reads as.

I believe that room numbers are stored as strings. If that’s the case you can use the String from Object node to convert the type. Even easier, you can add empty quotes ("") after the List[0] part of the code block to do this. Then it would read:


Give that a try and see if it sorts things out.


thanks you helped me:


Definitely an issue with adding that many parameters.
My initial thought was that he could have room parameters Person1, Person2, etc for the maximum number of people assigned to a room. Then each person just gets assigned to an available parameter. ie. If Room1 has three people they get assigned to Person1, Person2, and Person3 respectively. It still leaves you with a handful of parameters, but when querying them later (assuming it’s with Dynamo) you could concat all the parameter values and do a single search per room.

A container family is more work up front, but definitely a more effective solution in the long run.


this is what I wanted to do indeed, normally maximum 5 people per room.
Still prefer the container family after all. I will definitely do that. Because I am quit shure that we have to add parameters like phonenumber / job etc. in the future.

But for now, I have to present something next week, so I am making the project parameter option.