MEP design and Dynamo

Most of the work we see with Dynamo involves designing complex parametric geometry. But Dynamo can also help you automate your design and make more informed decisions, even on the most ordinary cubic building.

A lot of tasks of the MEP engineer involves retrieving information from the architectural model and can be automated using Dynamo.

The first task of the MEP engineer is to retrieve rooms from the architectural model and create MEP Spaces from it. The “Place Spaces Automatically” Revit function can be useful here, but it is far from enough in many cases. There isn’t any control on the created spaces, and properties from the room cannot be added to the newly created space.

To improve on this function, I start exploring space creation in Dynamo. There isn’t much support for Room and Space built in Dynamo. Some package can fill this gap (Lunchbox from Nathan Miller and Clockworks from Andreas Dieckmann) but does not offer a complete solution. Furthermore, we need support for linked files, since architectural rooms are most of time in linked files.

So I create my own Dynamo package, called DynamoMEP. This package contains a set of nodes for creating and working with Room and MEP Space.


I use these custom nodes to create an MEP Space from every Room in a linked architectural project.

I start by retrieving linked rooms using SteamNodes, a great package from Juline Benoit. Using Element.GetFromLinkedFile gives me a list of rooms in the linked file (The Get Document came from the Grimshaw package).


Using the Room.FromElement node, I convert these linked elements into Rooms. I can now get their location points, and create my MEP spaces based on these points.


Still using the DynamoMEP package, I can retrieve basic properties from these spaces, like their origin point, their associated level and their bounding elements.


My model has now a matching MEP Space for every room created in the linked model. Since we are using Dynamo, we can have a much more sophisticated workflow, and retrieve specific properties in the rooms to have them added to the newly created space.

DynamoMEP is still in this infancy, and need a lot of improvement, so don’t hesitate to report any bug or missing feature. You can add an issue on Github, or post a comment below. I hope to add new features as I develop MEP workflows in Dynamo.


Details Items, subcategories and filled regions

I am currently working with multiple detail items to create a set of views for architectural detailing. These Detail Items must comply with a precise standard for color and line weights, and of course, be consistent all over the model.

To implement these requirements, I define a set of subcategories for these detail items. Let see how it works with these two wood windows details.


These detail items already contain various subcategories, and I can control the color, weight and patterns of their lines in Visibility Overrides. Here Medium Lines are blue and Light Lines are red. Interesting, but not quite enough.


I open these two detail items, go to Object Styles, and create four new subcategories: Wood, Glass, Sealant and Steel. I also remove the previous subcategories. I can now select all lines in the detail item, and assign corresponding subcategories to these lines. Once these detail items are loaded back in the model, the four Detail Item subcategories are visible in the Graphic Overrides window.

I can now control line color, weight and pattern directly in my model, in the Graphic Overrides window for the current view, or in the Object Styles window to apply these colors to every details in the model.


Sadly, there is no corresponding feature for managing filled region. As you can see in the picture above, the wood pattern is still in black.

In order to change pattern or color in a filled region, you have to edit the detail item and change the filled region style in the family. If you want to edit your wood pattern, you have to open every detail items containing wood, and change the pattern in the family.

To fix this, and be able to edit directly filled region style for every detail item, I create a small piece of code. This function matches model filled region types with those inside the detail item. So if I have a filled region in my Detail Item family with the same name than one in my Revit project, this filled region will take the properties of the one in the project.


After running this function, I end up with nicely matching wood pattern, all set up directly in my Revit project.


As usual, you will find the source code for this solution below, I hope it will help you solve your filled region issues.

public partial class ThisApplication
	public void MatchFilledRegion()
		Document doc = this.ActiveUIDocument.Document;
		//Find all Filled Region Type, and create a dictonary with it
		Dictionary<string,FilledRegionType> modelFilledRegionTypes =
			new FilteredElementCollector(doc).OfClass(typeof(FilledRegionType)).ToElements().Cast<FilledRegionType>().ToDictionary(e => e.Name);
		//Find all loaded families
		IList<Element> elements = new FilteredElementCollector(doc).OfClass(typeof(Family)).ToElements();
		//Get Detail Item category id.
		ElementId detailItemCategoryId = doc.Settings.Categories.get_Item(BuiltInCategory.OST_DetailComponents).Id;

		//Loop on all loaded families
		foreach (Element familyElement in elements) {
			Family family = familyElement as Family;
			//Exit the families loop if it isn't a Detail Item Familly
			if (family.FamilyCategory.Id != detailItemCategoryId) continue;

			//Open the family
			Document familyDoc = doc.EditFamily(family);
			string familyPath = Path.Combine(Path.GetTempPath(),family.Name+".rfa");
			bool familyEdited = false;
			//Find all Filled Region Type in the family
			IList<Element> filledRegionTypes = new FilteredElementCollector(familyDoc).OfClass(typeof(FilledRegionType)).ToElements();
			using (Transaction famTx = new Transaction(familyDoc))
				famTx.Start("Edit Filled Region Type");
				//Loop on all Filled Region types in the family
				foreach (Element filledRegionTypeElement in filledRegionTypes)
					FilledRegionType filledRegionType = filledRegionTypeElement as FilledRegionType;
					if (modelFilledRegionTypes.ContainsKey(filledRegionType.Name))
						FilledRegionType refFilledRegion = modelFilledRegionTypes[filledRegionType.Name];
						//Change the color
						if (filledRegionType.Color.Red != refFilledRegion.Color.Red
						    || filledRegionType.Color.Blue != refFilledRegion.Color.Blue
						    || filledRegionType.Color.Green != refFilledRegion.Color.Green)
							filledRegionType.Color = refFilledRegion.Color;
							familyEdited = true;
						//Change the Background
						if (filledRegionType.Background != refFilledRegion.Background)
							filledRegionType.Background = refFilledRegion.Background;
							familyEdited = true;
						//Change line weight
						if (filledRegionType.LineWeight != refFilledRegion.LineWeight)
							filledRegionType.LineWeight = refFilledRegion.LineWeight;
							familyEdited = true;
			if (familyEdited)
				familyDoc.LoadFamily(doc, new FamilyOption());
				familyDoc.Close( false );
				familyDoc.Close( false );

public class FamilyOption : IFamilyLoadOptions
	public bool OnFamilyFound(bool familyInUse,out bool overwriteParameterValues)
		overwriteParameterValues = true;
		return true;
	public bool OnSharedFamilyFound(Family sharedFamily,bool familyInUse, out FamilySource source,out bool overwriteParameterValues )
		source = FamilySource.Family;
		overwriteParameterValues = true;
		return true;

A360 Team

A year after my first post about Autodesk A360, I kept on testing its features as they came out. When one of my colleagues brought me an A360 Team subscription from last year Autodesk University, I tested it on a small project with some of my teammates.

Recently, Autodesk  unrolled a new design for A360. I use this occasion to share my thoughts about the evolution of the service since my last post.

Starting using A360 is really easy. Just invite your teammates to your A360 hub, drag and drop documents to the platform, and start editing or commenting them. Basically, anyone can edit anything, the revision control system is here to retrieve any previous version of a document in case of emergency.

Roles and permissions are organized around Team Members, who belong to an organization and have access to every project inside this organization. These Team Members can invite Project Contributors outside of the organization to participate on a specific project.


Different project types allow for different accessibility rules for Team Members and Project Contributors. However, don’t expect to find tune every option, we are not in a tightly controlled document management system, but more on a collaboration platform based on trust and a powerful versioning system.

Of course, A360 provides the ability to upload Revit models, and process them as they arrived on the platform. To me, this is the most important feature. Every model you upload on A360 will be processed to be visible online, without having to download it. This feature has largely improved since my last article, and you can now select which views and sheets that will appear on A360. To do so, open the Views For A360 windows in Revit and create a set of views to be uploaded to A360. Save your model, upload it, wait for a while and every selected view will appear on the model page.


You can upload a single file or an assembly, which is a set of files linked together. When uploading an assembly, A360 asks for a parent file and uploads it along with every other file in the same folder. As it is processing this parent file, it takes these linked models into account to create online views.


My first impression of the online 3D viewer is quite good. It is fluid and really easy to use. One of the wishes of my previous article have been fulfilled, you can now create Sections of your model. Sections are beautiful, with a nice cut pattern, but the section plane is barely usable. Instead of being able to quickly select a face of your model to create a section plane, you have to painfully drag a predefined plane where you want to cut your model. Since the section plane gizmo stays aligned with the model origin, you can’t move it while zooming. I have to say I was pretty frustrated by the experience, seeing everything I was hoping for a web-based model viewer, and not being able to use it because of these few issues.

And why the Measure tool shows up when the model is loading and disappears when the viewer had started?

Aside from the current issues of the 3D viewer, Autodesk has created a really interesting collaboration platform. Roles and permissions manage to stay simple while enabling most collaboration scenarios. I still have to test the integration within Revit through the A360 Collaboration for Revit, as soon as it will become available in Europe.