I know this topic has been discussed a bunch already, but it seems like nothing is really working for me. Since Revit likes to take the area of all sides of glass, we can’t easily easily calculate the percentage of openings in a wall for our drawings. So what I did was I made a window area schedule and calculated out the area of each window by a calculated value of ‘Height*Width’. This is filtered by orientation since we need this calculation only for certain walls. I am now trying to take the Total of those windows, sorted by orientation, and place them into another schedule where I can take the area of the walls that they are in and calculate the percentage of the openings. I made this script from another post, but I keep running into the same issue. Please helpWrite Calculated Value to Shared Parameter.dyn (15.0 KB)
Hi @e1uvs I had a look at your graph and first just a thought…
In regards to these two statements, neither of these calculations need to be done in Revit schedules; you can obtain these calculated values within Dynamo and skip some added steps.
You should have a look at the inner makings of the Rhythm.PercentGlazingByOrientation node (from the Rhythm package) I believe this is exactly what you are trying to set up, maybe slightly differently for your end goal/use of the percentage.
If you have a look at that node, you’ll see the method is to collect all walls and then filter them to only exterior walls. Get the exterior wall’s areas, and the inserts (in your case, windows) of each wall and their areas. Once you have the area of windows per each wall, you can get each wall’s area parameter value, and obtain a percentage that way.
You might be able to just use that Rhythm node as is. If not here’s a capture of a graph of the method I’m describing:
The Rhythm node did end up giving me percentages, but unfortunately your graph method did not. I am not sure why, but it comes up with an internal error when we get to the window categories. I was thinking this way would work much better since then I hopefully could then get more specific and get the percentages for only certain walls, but it just isn’t working. I may have missed something.
Percent Openings.dyn (19.7 KB)
@e1uvs I believe the only discrepency between your graph and the workflow I showed you is the lacing on the second Element.GetParameterValueTypeOrInstance node that is getting the height and width parameter values of the windows in your graph - set the Lacing on this node to “Cross-Product” and let me know if this gives you the results you are looking for
Hmmmm that still is giving me the same error for the ‘Element.GetCategory’ node. It says, “Warning: Internal error, please report: Dereferencing a non-pointer.” This is a whole other issue to solve.
@e1uvs Can you show me a capture of your graph with the error, and the preview visible or with a watch node on the Element.Inserts node? When I run your .dyn on my file, the lacing difference is the only thing that I noticed so I’m guessing there is something with your Revit file and maybe you’re getting some null values or Empty List items.
That was the problem. Should have thought of that. I placed a List.Clean node in there and now I am no longer getting the error. Now I can use this to do % by certain walls
The Empty List or nulls may have been a result for Curtain Walls, since they cannot have inserts. The workflow I provided didn’t filter out Curtain Walls before passing through the Element.Inserts node, but that can be done as well if you don’t want to include the Curtain Wall areas in your percentage calculations. If you do want Curtain Walls’ areas as part of your calculation, using the List.Clean node the way you have works too!
This project has a bunch of curtain walls so we definitely want to filter those out. Thank you so much for the help!
No problem @e1uvs Here’s an update to what I shared above with an addition of filtering out curtain walls.
I’m working on a similar script to calculate the percentage of openings in specific walls. I modified the script you two created so the initial input is now a selection of walls that I specify before running the script. The problem I have run into is now is the openings are being counted twice. The wall area parameter being pulled out of revit already has the window openings taken out so it is not actually the Total wall area. Any thoughts on how to pull the total wall area out? I am thinking about using the wall length parameter and then the top and bottom hosted levels to get the height. But then how should I approach getting that back into the final code block?
Nice! Can you package it?