I have multiple wall types in Revit, each composed of several layers with different materials (e.g., finish, substrate, structure). I want to extract the ordered list of material names for each wall type’s layers and store this list as a single text string in a shared parameter attached to the wall type.
The goal is to:
- See the full ordered material layer list (e.g., “Gypsum, Insulation, Concrete”) inside a shared parameter for each wall type.
- Have this parameter visible in the wall type properties and include it in wall type schedules.
- Automatically update this parameter using Dynamo, so it reflects the actual layer materials in the wall’s compound structure.
What’s the best way to achieve this? How can I:
- Extract ordered layer materials from each wall type?
- Combine them into a single text string?
- Write that string into a shared parameter on the wall type?
I have uploaded a picture of what i have tried but it keeps crashing, so i need a simpler method.
Any Dynamo scripts would be appreciated!
1 Like
Hello, and welcome. Please pin your data preview as the following image so we can see where the problem is (also use the “export as image” with all text visible instead of print screen).
On my side, the names are all being collected as expected.
1 Like
Thank you for your reply, i have uploaded a new picture now. As can be seen the list seems to work. However as soon as i connect the element from “all elements of category” to the element of “Element.SetParameterByName” my revit crashes. The image shows the before due to the crashes. Inside revit i have set a Shared Parameter called “Material Layers”, it is set as a text parameter, grouped under text and appied to walls.
1 Like
Do you have your graph set to run un Automatic? There’s a selection box on the bottom left of the screen. What may be happening is Dynamo starts to run, but since it’s Auto, it enters an infinite loop of reading and setting parameter until revit crashes.
Change it to Manual and see how it goes.
Another thing, if your parameter is set as Type, you need to connect the WallType instead of the Wall to the SetParameterValue node. Give a look into primer as to how you should manage lists. It’s probably not going to crash as it is, but if you have 100 instances of walls of 5 different types, you (could) only need 5 iterations instead of 100, which will make your graph run faster.
Let me know how it went 
Worked perfectly, now i will take a dive into eliminating duplicated walls like you suggested i somehow need to only have one of each type and not ever instance any suggestions? Thank you so much! 
1 Like
Great to hear it worked!
Sure. What you need to do is check for unique items just after the ElementType node. I’ll leave the details for you to discover, it’s the best way to learn 
Edit: Use Primer as your primary resource for knowledge, and if you need help, there’s a lot of previous answers in the forum, and you can always ask something that’s not here yet 
1 Like
Hi @kvcXCAA8 Kasper,
Not a straight answer to your questions, but you can always consider to leave the schedules and the need to manage a large number of Family types.
If you create parts, you can get your description from the material, or from a combination of
-type (wall),
-Material(insulation) and
-instance (width) characteristics.
So you have a maximum benefit of the modelling environment, have Dynamo synthesize the codes, and find the result in Assemble or Power BI.
Coding can be done on Materials, elements, or a combination of both.
2 Likes