Match Family Material by It's Host

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, شکرا

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:

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

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

See also this for the FamilyType.CompoundStructureLayers node:

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

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 :slight_smile:

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.

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://dictionary.dynamobim.com/
There are also courses to be found online if necessary. Last advice: start with something simple and add complexity progressively…

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.

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:

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.

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.


DoorsSample.dyn (17.8 KB)
DoorsSample.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

1 Like

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

1 Like

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!

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

Cheers!

2 Likes

:sweat_smile: ok

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."

2 Likes

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.