Material duplication from XLS

I’m struggling with a graph… I have an XLS file with material names and RGB values. I’m using Revit 2018, Clockwork to duplicate a material and GeniusLoci to apply the color to the material asset. I have 90% of it done but instead of looping through the list of materials it’s only duplicating the first one and renaming it. It’s also not applying the color. I’m not sure what I’m missing at this point. Here’s a link to a ZIP file containing the XLS, DYN and my sample model. https://autode.sk/2rfLFHo

Any help is welcomed and appreciated.

bump

Hi Matt,

You were almost there.
First, purge existing materials and appareance assets in your sample model to avoid errors.


Then set the lacing on Longest on the Material.Duplicate node.

And it works :grinning: :

1 Like

Thanks! I figured it was something simple (but didn’t think to look at, or change, lacing). Glad to know I was on the right track and finally getting the hang of this. :slight_smile:

Thanks again!!

1 Like

One last question and I don’t know if it’s a by-product of my code or how the GeniusLoci or Clockwork nodes are written but… after the materials are created I’ve noticed that the shading is black even though “Use Render Appearance” is toggle on.

And the appearance tab has the correct color applied. So when your views are set to shaded everything is black that has these materials applied. In realistic they show correctly.

I haven’t been able to find anything about this issue or how to correct it. It’s almost as if the materials need a regen or refresh somehow. Thoughts?? Suggestions??

You’re right, there is a bug when the “Use Render Appareance” is already checked during the creation of the materials. I can’t reproduce this bug manually.

Fortunately, there is a workaround :grinning:
Uncheck the “Use Render Appareance” property before the creation of the materials and at the end of the graph check the “Use Render Appareance”.


2018 Materials from Excel XLS V2.dyn (90.2 KB)

1 Like

Thanks again! That node actually works in 2018 (thankfully) even though its tooltip says “2019 and later”. :smiley:

Oh yes, the Use RenderAppearance, color and Transparency inputs work in 2018 but the foreground and background pattern were added in Revit 2019.

1 Like