Get list of room numbers inside model group

Hello Dynamo community,

Please help with this seemingly simple task. I am currently working on a large project where the model has been created using model groups called ‘clusters’ containing groups of rooms.

We are currently looking to break the groups as there are problems arrising with Cobie data etc. before we do this I would like to create a list of all of the Room numbers under the model groups name as headings.

I have created the attached graph but am struggling to find a way to put my two lists together. The screen shot from excel is what I am trying to achieve.

Any help would be much appreciated.


@MakerVerde ,

to access your rooms you can use groupByFunction…

you can filter the rooms out of the group.members.
However if you are solely concerned with rooms, you can get the rooms and use Element.Group (from clockwork) to get the group and it’s name

1 Like

Thanks @Draxl_Andreas,
Does the Object Type node need an input? As it is it just returns the same list as Group.GetMembers but with an additional level


?

Thanks @viktor_kuzev, Almost there! I just need to sort the list I have by the Cluster Type. Any suggestions how I could so this?

List.SortByKey is what you’re looking for

Thanks for taking your time to look at this Viktor,
I now have a list of the cluster types with the rooms. Ive been trying to arrange it so that it reads logically but cant figure it out.
Is it possible to group the cluster types so that only one of each cluster type appears with the list of rooms in that cluster below (see attached)
Rooms-model-groups-excel-Viktor


?

similar to List.SortByKey there is List.GroupByKey - which will make groups by the unique keys.
then to write that to Excel the way you want it you’d need to do some list management.
Or alternatively there might be some excel functions to do the grouping.

Thanks Viktor, for some reason the graph is outputting some contradicting information to what is shown in revit. I was using the output of the graph to manual input data into excel as a sense check and noticed some inconsistencies. I now have the full list with the cluster types.

The next task is to input the cluster type using excel back into a new project parameter I have created for the rooms. Should I continue this thread or start a new one?

well for group names it should be noted that when you get their names the ones with excluded members would have a different name - “OLD_NAME (Members Excluded)”

Please use the search first as I think there are many topics on fetching information from excel and feeding it in to parameters, but of course if you don’t find your answer you can start a new thread.

1 Like