Multiple materials after change of material

I am using Dynamo 2.0.2 stable build.

I have referenced some topics in this forum, but find something no longer valid:

This method no longer works. The string-ElementType.ByName gives the same result.

And, using Element.SetParameterByName to set another Material.ByName to parameter “Structural Material” I can change the material, in Revit it is reflecting the new material, but if I check in Dynamo with Element.GetMaterials I find now there are 2 materials attached to the elements changed instead of 1. So how can I do to complete replace the old one? Thanks

Hi @yixuan,

For your first problem, use the Categories node.
Materials

2 Likes

Need to see the 2nd one in action - I’m a bit lost unfortunately.

Before


After change



And if you look in Revit the old material has been replaced by the new material, but why the old one is still there in Dynamo?

Hi @yixuan

Could you drop here Revit family?

Would you expand the preview of the All Elements of Family Type nodes?

Hi Kulkul, i just used the Revit advanced structural sample project for testing.

Hi Sean, i just used the Revit advanced structural project for testing. There are 189 instances of them. See updates above

This is very unique, but appears to be something wrong with that particular family. When I create a new Column family from the family template, it does not recreate the issue, but even when delete and make a new extrusion in the RAC column it does the same. My guess it something embedded in the family, but nothing wrong with your graph.

Ok thanks Sean…At least the graph would get the material changed then it should be ok

1 Like