Hello,
I’ve been working this past week on Occupant Loads for a project. In it, I was tasked with getting the total amount of the occupanct load of rooms contained in areas, and then giving this total amount to the respective areas.
This is my second or third time using Dynamo, so i did the best i could but ended up getting different results when comparing the total amounts of the rooms and the areas:
[Total Occupant Mismatch]*
Occupanct Loads are calculated by an index (e.g.: 40, 0.5, 20…) by which the area of the room is divided.
I want to be totally honest in that i made a mistake, because i used the parameter “CARGA DE OCUPACION” (Occupant Load in Spanish) to both store the index for rooms and the calculated occupant loads for the areas. I know it would be “more correct” to have those two separated, but i noticed only when i had already ran the routine several times.
I ended up using BoundingBox.Contains in lieu of Polygon.ContainmentTest because the latter made Revit crash. I believe this is due to the sheer amount of rooms (>2600).
Also, the Areas are in a central model, while the rooms are in different linked models. The first par of the script is meant to limit the amount of loaded links so that Dynamo/Revit doesn’t crash.
The routine calculates the Occupant Load and rewrites this information into the areas, as I said before.
For the calculation of each individual room, I used a Calculated Value in a Revit Schedule:
[Calculated Value, Schedule]*
So, I would love the assistance in debugging, fixing or tweaking my dynamo script, so that i can get a result ideally equal to the one i get in the Revit Schedule.
Much appreciated
*[I couldnt upload all the images i wanted to because my account is new they are included as replies below]
Neither could U upload the .dyn file, so here’s a link: