# Match Family Material by It's Host

**URL:** <https://forum.dynamobim.com/t/match-family-material-by-its-host/9204>\
**Category:** Revit\
**Created:** [January 27, 2017, 7:05pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204 "2017-01-27T19:05:04Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arsham](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arsham/32/168335_2.png) [@Arsham](https://forum.dynamobim.com/u/Arsham)\
**Post date:** [January 27, 2017, 7:05pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/1 "2017-01-27T19:05:04Z")

</div>

I have 3 different wall types, their finishing materials are different, blue, yellow and red. I have 1 door on each of these walls, I want the door material (color) match the wall instantly!

is there anyone who can help me please ???

Thanks, Mersi, Danke, Gracias, Teskkurler, شکرا

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 27, 2017, 8:04pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/2 "2017-01-27T20:04:12Z")

</div>

Material is a type parameter for a wall. You can get its value with _FamilyType.CompoundStructureLayers_ from _Clockwork_. If the material parameter of your door is an instance parameter, you will set it with a _Element.SetParameterByName_ node. If it’s a type parameter, you could for example set it with _SetParameterByName(TypeOrInstance)_ from _Rhythm_. For further details, you will find a lot of related threads through the search field, for instance:

> [@Wall Layers and Material Custom Parameters](https://forum.dynamobim.com/t/wall-layers-and-material-custom-parameters/695):
>
> I was wondering if it was possible to access Revit wall layers (compound structure) and their properties? I was also wondering if it was possible to access Revit material custom parameters. I’m not a programmer unfortunately so I’m hoping there are custom nodes available to do these things as I think these items are available theough the API. Sorry if my questions are elementary or annoying.

You can also take a look here for general notions:  
[http://dynamoprimer.com/en/08\_Dynamo-for-Revit/8-3\_Editing.html](http://dynamoprimer.com/en/08_Dynamo-for-Revit/8-3_Editing.html)  
[http://dictionary.dynamobim.com/#/](http://dictionary.dynamobim.com/#/)

If you encounter some issues, please post a screenshot so that someone can give further advice…

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 27, 2017, 8:13pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/4 "2017-01-27T20:13:12Z")

</div>

See also this for the _FamilyType.CompoundStructureLayers_ node:

> [@Set family parameter \\"Material for model behavior\\"](https://forum.dynamobim.com/t/set-family-parameter-material-for-model-behavior/3032/2):
>
> Hi Dynamocando, There is a custom node from “Clockwork Package” called “FamilyType.SetCompoundLayerMaterial”. Try using that see if it helps. Below is an example of walls.

…and this for setting parameters (type or instance):

> [@Adaptive Components - Set Instance Parameters with Dynamo](https://forum.dynamobim.com/t/adaptive-components-set-instance-parameters-with-dynamo/6542):
>
> Having trouble accessing the instance parameters of the family through Dynamo. With the Element.SetParameterByName returning “No Parameter found by that name”. Please see screen shots below. Any help would be appreciated! slight_smile

You should find your way with this. Please remember that specific questions receive an answer most of the time on the forum, especially when they follow these basic guidelines 🙂

> [@How to get help on the Dynamo forums](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677):
>
> One of the main goals of the Dynamo community is to help others. One way to do that is by answering your questions. But to get the right answer, you’ll first have to ask your question in the right way. Although people are generally very helpful, there are things you can do to improve your chances of getting good and quick answers. Below you will find some suggestions on how to achieve that. Do not think of these suggestions as rules and especially do not take them as a guarantee of getting an an…

---

<div class="post-metadata">

**Author:** ![Arsham](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arsham/32/168335_2.png) [@Arsham](https://forum.dynamobim.com/u/Arsham)\
**Post date:** [January 29, 2017, 9:39pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/5 "2017-01-29T21:39:12Z")

</div>

I can’t work it out, i’d appreciate if you can do a sample for me please!

3 walls with 3 different finishing material, each wall has a door on it, i want the doors material to match the walls!

Please and thank you.

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 30, 2017, 7:32am UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/6 "2017-01-30T07:32:25Z")

</div>

Please send your first attempts, it’s necessary start something in order to understand further explanation. You will find models to get started in the posts previously mentioned. The first stage if you don’t know Dynamo at all is to browse these pages:  
[http://dynamoprimer.com/en/01\_Introduction/1\_introduction.html](http://dynamoprimer.com/en/01_Introduction/1_introduction.html)  
[http://dictionary.dynamobim.com/](http://dictionary.dynamobim.com/)  
There are also courses to be found online if necessary. Last advice: start with something simple and add complexity progressively…

---

<div class="post-metadata">

**Author:** ![Arsham](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arsham/32/168335_2.png) [@Arsham](https://forum.dynamobim.com/u/Arsham)\
**Post date:** [January 30, 2017, 1:18pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/7 "2017-01-30T13:18:37Z")

</div>

Well thank you so much for the information I already know, I have a deadline for a 110 unit residential project, I don’t have time to go through tutorials and stuff, I thought someone can help me here, looks like I was wrong.

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 30, 2017, 1:41pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/8 "2017-01-30T13:41:30Z")

</div>

Sorry not to meet your expectations, but this is a site for learning and asking for advice when you are stuck in the process. Requests for unpaid work are not eligible. Please come back when you have time and you will surely find some nice support here. Thanks for your understanding.

For anyone interested, please read **point 7** in the first post of this thread:

> [@How to get help on the Dynamo forums](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677):
>
> One of the main goals of the Dynamo community is to help others. One way to do that is by answering your questions. But to get the right answer, you’ll first have to ask your question in the right way. Although people are generally very helpful, there are things you can do to improve your chances of getting good and quick answers. Below you will find some suggestions on how to achieve that. Do not think of these suggestions as rules and especially do not take them as a guarantee of getting an an…

---

<div class="post-metadata">

**Author:** ![Arsham](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arsham/32/168335_2.png) [@Arsham](https://forum.dynamobim.com/u/Arsham)\
**Post date:** [January 30, 2017, 2:00pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/9 "2017-01-30T14:00:05Z")

</div>

For your understanding, I’d like to mention that I didn’t ask anyone to do my work for me! I just asked for a sample, like a screen shot or something! like what everyone else does.

---

<div class="post-metadata">

**Author:** ![Petar\_Penchev1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/petar_penchev1/32/8592_2.png) [@Petar\_Penchev1](https://forum.dynamobim.com/u/Petar_Penchev1)\
**Post date:** [January 30, 2017, 2:45pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/10 "2017-01-30T14:45:12Z")

</div>

Hi @Arsham,

Here is my quick response to your problem.  
First I suggest you to edit the door family in order to have instance parameter for the door material. That is how with one door type you could have different door materials, but if you wish you could use different door types it is up to you.  
After that I’ve created 3 different wall materials for each colour and 3 different door materials.  
The logic is to get all the doors you need to change, than to get their host wall type and according to the wall type name to filter the three different colours. When you have the three lists filtered by colour you could just assign the material parameter to each list. Hope this helps.  
Here is a quick screenshot and my sample files.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/a/4ad857ca622be94663c5f98d763eb882aeb2ab01.png)  
[DoorsSample.dyn](https://forum.dynamobim.com/uploads/short-url/pWOERUj7JG1aOZoPK5rakR5EVJU.dyn) (17.8 KB)  
[DoorsSample.rvt](https://forum.dynamobim.com/uploads/short-url/cAcO77BiYikodQmlRbO3FCRcSZr.rvt) (1.9 MB)

P.S. In the Revit file the doors are with changed colours. You Could try add new doors from the same type and see how their colour is changed according to the wall they are placed, when you run the script

---

<div class="post-metadata">

**Author:** ![Arsham](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arsham/32/168335_2.png) [@Arsham](https://forum.dynamobim.com/u/Arsham)\
**Post date:** [January 30, 2017, 2:53pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/11 "2017-01-30T14:53:25Z")

</div>

You are the best!!! Thank you so much, i really appreciate your help man.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [January 30, 2017, 3:39pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/12 "2017-01-30T15:39:25Z")

</div>

Hi @Arsham  
@Yna_Db gave you clues to get you started. You can’t let anyone do your job. You should try first and come back here if you failed. There are rules of the forum everyone has to follow. Hope that make Sense!

> [@Arsham](#):
>
> You are the best

And also no one is best here. We are all learning when placed in specific context.

Cheers!

---

<div class="post-metadata">

**Author:** ![Arsham](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arsham/32/168335_2.png) [@Arsham](https://forum.dynamobim.com/u/Arsham)\
**Post date:** [January 30, 2017, 3:54pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/13 "2017-01-30T15:54:53Z")

</div>

😅 ok

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 30, 2017, 4:11pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/14 "2017-01-30T16:11:35Z")

</div>

For anyone browsing this thread, here is the forum guideline that has to be followed in any case:

" **\_7. This is not a ‘do my work for me’ group** \_

_Many of us like to help, but it’s good to see effort on our part being matched by effort on your part. Questions in the form of ‘I need to do X but cannot be bothered to try and learn the software’ **will (and should) go unanswered**_."

---

<div class="post-metadata">

**Author:** ![cftrevizo](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@cftrevizo](https://forum.dynamobim.com/u/cftrevizo)\
**Post date:** [November 17, 2017, 5:03pm UTC](https://forum.dynamobim.com/t/match-family-material-by-its-host/9204/15 "2017-11-17T17:03:00Z")

</div>

Nice, This is a good doorway/segue into initially applying Door Ratings from Wall Ratings. Now to figure out applying exceptions at the same time, lol.
