Changing wall materials

Hi,

I have hundreds of wall types. Most of them need a material change because the paint manufacturer (hence, the paint color) is other now.

I’ve already configured the new materials, and I figured this: first I retrieve all the walls materials, then filter the ones with matching marks, then when I get ex. material 307 manufacturer X I replace for material 307 manufacturer Y.

However I could even get values for Mark and Manufacturer parameters, as the pic shows. The error is “Warning: Internal error, please report: Dereferencing a non-pointer.”

I appreciate any help

Hi @rodrigo.bezerra

Use List.Clean node before GetParameterByName. That error indicates there are nulls in your list.

1 Like

It worked, but using another node, so I don’t loose the indexes.

What I figured now is that I don’t really know how to:

  1. knowing which materials are from manufacturer X, list which has marks starting with a given character;
  2. return to the primary list and get item at indexes

Not sure if this is what you are looking for, but this script will replace all materials that match the name with another material in all layers of a wall.

Materials - Change Compound Type Materials.dyn (35.1 KB)

1 Like

If it’s not the solution, might lead me to it. I’ll check and get back tomorrow. Thank you!

1 Like

@SeanP just a follow-up: I tried the dyn you shared, but there are a few packages missing in my PC. I think there’s something with my Dynamo version also… I’m in 1.3.4 because 2.X do not load any packages (not sure why). Some custom nodes aren’t working.

Unfortunately I do not have the time to explore Dynamo right now as I’m behind my schedule. I’ll explore it a little more later.

Thank you so much!

The script I provided is written in 1.3.4. The script uses Clockwork and Data-Shapes.

Here is an image of the graph as well if it helps you build what you need.

I also removed a couple nodes that were internal tracking and information nodes to hopefully make it work a little easier for you.

Materials - Change Compound Type Materials.dyn (35.6 KB)

1 Like

Hey Sean - Is this able to be expanded?? would love to pick your brain on possibly setting something like this up, but to update materials for several categories at once (floors, ceilings, walls, doors, frames.)

There may be ways to extend it yes, but keep in mind that as it is now, it is only for compound (system) families like walls, floors, and roofs. Singular (family instance) things like Doors or frames would be different.