Merge multiple separate walls into a single wall with multiple layers

Hi,
I’m looking for a solution to merge multiple separate walls into a single wall with multiple layers.
Have you any ideas?

Thanks a lot!
@Alban_de_Chasteigner

Are you saying that you have the layers of a wall modeled as separate elements and you want to replace it with a single new wall? For example, take three different layers:

5/8” GWB
6” Metal Studs
5/8” GWB

If these are modeled as “Walls” themselves, and have proper materials assigned, you would have to create a new wall type, e.g. “A6” where the compound structure would contain matching layers. In order to do this, you will have to use the Revit API rather extensively, focusing mainly on the CompoundStructure class. There are other code fragments on Jeremy Tammik’s blog and the Revit API forum which will give you an idea of how to actually create a wall.

Hi @NLA,

Welcome to the Dynamo forum.
It’s good practice to show one’s trials when asking for help.
[How to get help on the Dynamo forums ](http://How to get help)

Anyway here is an example :


3 Likes

The Orchid package has nodes to manipulate CompoundStructures - see Elements - SystemFamily
. Writing your own code might be more efficient though.
(@erfajo)

Thanks a lot for your answers.
I have tried @Alban_de_Chasteigner’s solution. It seems there is somethng wrong with the component : create Compound System FamilyType :

The inputs seem to be good…
Which version of Dynamo do you use? I am currently on Dynamo 2.0.1. I have seen a new update V2.1.0. Maybe it is a part of the solution?

When I launch the script, the monolayer walls are deleted but the new multilayer wall is not created.
Thanks for your help!

The problem comes from the inputs ShellLayerNumber. You’re asking the Create System Family node to create a wall with 4 layers and providing only 2 layers.
So leave the default ShellLayerNumber inputs (0) and it will work

I left the defaut value 0 for the numberOfShellLayersExterior Input and the NumberOfShellLayersInterior input but it still doesn’t work (=Null)

I try to understand how works the python script (Create Compound System familyType). According to me, the script creates automatically a layer for the structural materials. Then, for the other materials (eg : thermal/Air Layer, substrate, finish…), it creates the number of shell layers (exterior or interior) depending the input numbers. Am I right?

By this logic, if I have two layers (including a structural material) I should put the value 1 in the NumberOfShells Interior(or exterior depending where I want the layer) input. Am I right or am I totaly wrong ? :wink:

Thanks a lot!

You are right for the functioning of the NumberOfShellLayers input.

Can you post a sample Revit file with your separate walls ? So that I can look for where the error comes from.

Here is a screenshot of dynamo :

And here is the revit project (only two walls) :
Test.rvt (3.3 MB)

Thanks for your help

The culprit is that you already have a wall named “Mur comp”.
Change the name and it should work.

It works for me in your sample file.


2 Likes

Thanks a lot, it works :slight_smile: