How to match level and view and finaly room areas

hello,

i want to map the sums of roomareas per level (BuildingStorey). whats here the best way ?

actually there is no clear relation between level and rooms (because the placement is sometimes different)

the views rule the sum of the rooms.


how to get it sorted ?

PyViewsPerBuildingStorey.dyn (32.8 KB)

Get their level name, group the room areas by that as a key, then sum the grouped areas. If the data is wrong there isn’t much helping that though…

1 Like

Here are two approaches you can take to map the sums of room areas per level (BuildingStorey) in Revit, even though there’s no direct relationship between levels and rooms:

Approach 1: Utilizing Schedules

Create a Schedule:

Go to the Insert tab and select Schedules.
Choose Room from the list of disciplines.
Add Rooms and Area Parameter:

In the schedule properties, under Categories, ensure Rooms is selected.
Add the Area parameter to the schedule.
Filter by Level:

In the schedule header, click on the dropdown filter icon next to Room.
Select Filter and choose BuildingStorey parameter.
You can now filter the schedule to show rooms for specific levels.
Group by Level:

Right-click on any header in the schedule and select Group.
Choose Group By and select BuildingStorey. This will group rooms by their level in the schedule.
Calculate Area Sum:

In the grouped section for each level, you can add a row to calculate the total area.
Use the schedule formula Sum to sum the area values for each level group.
Approach 2: Dynamo Script (for more automation)

If you’re comfortable with Dynamo, you can create a script to achieve this:

Import Revit API:

In Dynamo, use the Revit node to access Revit elements.
Get All Rooms:

Use the FilteredElementCollector node to collect all the rooms in the model.
Group Rooms by Level:

Use a GroupByKey node with the BuildingStorey parameter as the key to group rooms by their level.
Calculate Area per Level:

Loop through each group using a ForEach node.
Inside the loop, use a Sum node to calculate the total area of the rooms in the current group.
Present the Results:

You can display the results in the Dynamo interface or export them to an external file for further processing.
Additional Considerations:

If rooms span multiple levels, you might need to adjust the filtering or scripting logic to handle them appropriately.
Consider using DesignScript for manipulating elements within the Revit environment if needed.
By implementing one of these approaches, you can effectively map the sum of room areas per level in Revit, even with an indirect relationship between levels and rooms

1 Like

@GavinCrump @steinryan28

thank you! for the answeres i will test later…

rooms are at different levels, sometimes they apear in the sheet(s) twice (because of heights.

i have to calculate by “active view” for i have 13 values to place

Dunno if i fully get what your after but maybe
filter Rooms by Room Level == Active View Level?

1 Like

Some very interesting nodes you are mentioning there.

You should probably check the LLM answer before you post something here that will cause more questions then answers…

3 Likes

If you can decide which of these levels to associate the room with by some logical pattern, that information would be critical to determining the solution.

1 Like

@bvs1982

f.e.

i have a view on a sheet this view is created by “EG01_FBOK” but the rooms are placed differently f.e “UG01_RDOK” or “UG02_RDOK” with hight 8m , a.s.o.

But i need to map this Area-sum to a level that creates buildingStorey! thats only one per level…

later the value appears in the ifc like…

@MartinSpence ,

i will go thrue the points…

But shouldn’t something like this just work?

I still don’t get how the Sheets fit into the question.

1 Like

@bvs1982 ,

thats fine but how to match to the levels that create the buildingStories . i solved it via list and i set the parameter manualy

grafik

An alternative using the level below the room as its designated floor. (untested and it could be filtered to only include “Building Stories”

I will surely do Martin! Thank you for the feedback.