Sending Group member info back to Group parameter

I’ve posted about this before (and honestly I have a working script), but my team has asked me to make it simpler.

We are in Multi-Family and we have our units as groups. In those groups we have Gross Floors, Net Floors, and sometimes Balcony Floors.

We are needing to grab the Area info from the different floors in the group and send that back to the correct group parameter. That way we can have a single schedule with our Unit matrix, Counts, Areas, etc.

Any suggestions on methods to do this? I got to the point of having a filtered list of the Unit Group Types and filtered those Group Member Lists to just floors in those groups. The problem is grabbing the correct floor area and sending it to the correct place.

I had the thought that I could use ‘get item at index’ but that req’s that the floors be name similarly enough that they stay in the correct order.

At the end of the day it sounds fairly simple. We have a group and we have a list of it’s members and we just need to grab the areas from the floors and send them to the correct parameter in the group.

My working script works this way:
-We use the Scheduling group script from Revit Pure that give groups and it’s members unique identifiers.
-I then grab all the group in the project and filter by ‘starts with’ Unit. I then filter that down to first item so I get 1 instance of each group type.
-I then grab all the floors in the project. I filter down them down by using ‘starts with’ and use Gross, Net, or Balcony. This gives me all of each of those. I can then use the Group Type parameter from the Revit Pure script to get them in the same order as the units.
-I then plugged in some verification nodes to count each list to see if they are the same. That provides a popup that tell the user if the counts are the same and what each count is.
-If the counts are the same then I set parameter by name and use the unit list and the area list.
-We had an issue about not all units having balconies. In that script I used the ‘SetIntersection’ to compare lists and spit out a single list for both that only contain balconies.

  • We had another issue where there were 2 floors in the unit so I ran those in a different flow in the script and had Revit Add them. and then send it to the group.
    -Overall it works though but is dependent on the First word of the name of the units and floors be correct. Apparently my team want’s Unit to be first. Going that route make ‘contains’ not work well and since we use the schedule group script it makes ‘ends with’ not work well.

Anyway, sorry for the long post, but any help would be greatly appreciated. Whether that is a completely different method that works better or helping mod what I’ve done so far.

Thanks,
-Ian

There is a node which can grap members of a Group.
Maybe that is what you are looking for / can help.

Yes, I am using that node already and in saying what I want it sounds straight-forward. I have the groups and the members. Just grab the floor(s) and send them back to the group. But the order of where the floor lands can change, all units should have a gross floor but not all have balconies, there could be 2 levels of floors. So it’s isolating the correct floors is the issue in order to send that to the correct group parameter.

In my screenshot I’ve used it and I have the 2 lists down to the units and the floors in each unit. It’s grabbing the correct floor area and sending it to the correct parameter that is the issue.

I thought about using ‘get item at index’ but that is assuming the naming will be such that it puts the floors in the same order. It also assumes that each unit will have a gross floor (which is should)
The other route is going with the specific name of the floor but I don’t’ really like that because if any of the naming is off then it won’t work.

That cleared things up other than the previous wall of text :wink:.

And couldn’t tell you were using that node alread
because you only posted an image of (a) part of your script.

I think using the name approach would be the
best. Unless someone has a better idea :upside_down_face:.