Door Area to Host Wall Calculation

Hello everyone,
is there any way to add door area to Host wall.
i have used parameter “DoorArea” in Door family for calculate Door area, and Second i have added “DoorArea” to Wall with Project Parameter (instance).

as you can see i am sucessfully add single door area with single wall. but what if single wall have more then one door. i am not able to calculate that. so i need some guidance.

Best Regards,

Instead of just setting it, you’ll need to add the values together so you can combine multiple doors as needed.

Thanks for reply but i didn’t find the way of doing this.
do you know any node or method so i can go ahead with this?

First group the doors by their host with a list.GroupByKey node. I believe you will need to pull the ID of the walls with an Element.Id node. Use the converted value as the key. The area of the doors should be the list.

Then use a Math.Sum with longest lacing to get the total value of each sublist from the ‘groups’ output of the List.GroupByKey node.

Then convert the keys from the List.GroupByKey node back to elements (either by selecting by ID or by selecting by the ID or by grouping the walls, or by getting the index and pulling the elements that way, or one of a dozen other methods of list management), and set the values accordingly.

@JacobSmall thank you very much for advice.

i have workout as you say. see below script.

i think its done. just want to check once.
is this good or i need to change this.

1 Like

Looks good!

One thing to watch - I’m not sure it would ever occur though - is if your walls somehow become ‘out of order’ with the grouping order. You might want to do a manual check of this - not an easy task at scope. Better yet sort the walls using the element ID node as a key, and sort the list of groups by the keys.

A good way to handle that is to combine your two lists of data into one list and then transpose the list. This way you get a list of tuples.
0 - MyDoor
1 - Door Id
0 - MyDoor
1 - Door Id

This lets you keep the items and associated data grouped as they make their way through the script.

i think its working properly, i have also used pick new host and run, its working.
please find below revit file (2019) and dynamo file.

DoorHostArea.dyn (11.2 KB)
DoorHostArea.rvt (1.4 MB)

Please let me know if you find any error.