Create Area Boundary Lines with Apply Area Rules

I’m trying to automate the creation of rule-based Area Boundary lines. I know how to create them with the Area.SeparatorByCurve node, but it doesn’t apply Area Rules or move with a Wall it’s created on.

I found this in the API docs:
https://www.revitapidocs.com/2020/e75ba4d7-f2e6-e5c1-d695-ef6476a19711.htm
but it says in the “Remarks” section that it only works in Revit Structure?

Does anyone know a way to automatically create rule-based Area Boundaries on all walls instead of clicking each one? Thank you

That API is for the Boundary Conditions tool on the structural analysis side of things, and is used to communicate engineering assumptions about support conditions to analysis packages. Info on that tool (even though it’s not what you’re after) can be found here: https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/Revit-Analyze/files/GUID-537703E1-9AA8-49E6-9835-7D779C3FD547-htm.html

For area rules to apply the boundary has to have been created with an association to the wall’s reference, (which would tie the boundary to the wall). Looks like the API doesn’t currently allow such association as feeding a reference element causes a null result. As such I don’t think this is possible but someone else may know of a way, or I could have overlooked something.

If it truely isn’t possible then it’s best to make a idea station post in the relevant forum here: https://forums.autodesk.com/t5/revit-ideas/idb-p/302. Be sure to mention the need to do this via the API if you do so.

Also, let us know if you make such a post as I’m sure the community would love the ability to add such constraints in our element creation and would likely get behind this.

1 Like

I’ve created an idea post here:

https://forums.autodesk.com/t5/revit-ideas/api-pick-walls-for-area-boundary-lines-with-area-rules-applied/idi-p/9271192

Please let me know if I’m missing anything in the request, thanks!

Looks good! Don’t forget to vote for it!

FYI, I’ve created a workaround. Here is the final script (and beware, it’s a monster):
OCCUPANCY_1-Create and Update Areas.dyn (217.8 KB)
Packages required: SteamNodes, MEPover, designtech, Clockwork, Data-Shapes, Rhythm, archilab, GeniusLoci
Tested on Dynamo 2.0.3 and Revit 2019

The script workflow for the end user is only to Choose which Room Names in the View to create or update Areas on.

Behind the scenes:
When Areas are created by the script, they’re linked to the Room using the Area’s ElementID which is recorded into a custom Room parameter I called “Room ID”. The current Room’s Area size is also recorded in the Area Element in a custom Area parameter I called “Previous Area”. When Area Boundaries are created, their Element IDs are combined into a string and assigned to the Area element as its “Room ID”, linking them to the Area.

Using Dictionaries, when an Area is found that is associated with a Room, its Name and Number are updated to match the room. If the Area’s “Previous Area” parameter is found to be different from the associated Room’s area, the associated Area Boundaries are deleted and recreated using the Room’s finish boundaries. The Area’s “Previous Area” parameter is then updated to the current Room’s Area, and the new Area Boundaries’ Element ID string replaces the Area’s Room ID value.

This way, the user can keep running the script whenever they make any design changes, and their Area Plans (Life Safety Plans) will be updated automatically. Note that manually-created Area Boundary lines won’t be affected, this is good so users can draw in boundaries for fixed furniture, casework, etc. without having to redraw them each time

The only manual editing required is if you want use Gross Area for a space and include shaft openings or auxiliary rooms. You’ll have to manually edit the Area Boundaries each time the Room size updates, or change the bordering walls to not be Room Bounding.

4 Likes