Working with Compound Material Layers

Hi all,
I am trying to import the material data with a few custom parameters from a spreadsheet, create new material from the list, and replace the newly created with the existing materials (for the selected Revit element). If the element has one single material layer, my script is working well.

But, for compound structural layers, I have the necessity to repeat the steps multiple times based on the number of material layers. It seems quite complex, and the script is heavy.

In addition, the material layers differ based on the element type. So, I couldn’t overcome the issue by repeating the script manually.

So, I am trying to achieve a solution, where the script can search for the number of material layers, and repeat the process based on the count (index value).

Any help from the forum is appreciated.
Thanks.

You are best to send some screen grabs of the script/code to help.

Though looping over each structural layers will sort that for you. Eg it gets the Wall, then loops over each layer and applies what you want for each layer

3 Likes