Change Wall Type names

I am trying to replace some text in the names of my wall types with other (more abbreviated) text. Somewhere in my graph, there is an error. Does anyone know how to solve this problem? Also, the yellow error says “The parameter is read-only.” If I change the string node which has the value “Type Name” to have the value “Type”, the SetParameterByName node says there is no such parameter. Is the name of wall types truly a read-only parameter?

See here:

That post thread gets close to but does not do what I’m trying to do. I want to replace specific text, which is not as simple as subtracting a set of letters. I want to reduce “Exterior” in the wall types’ names to “Ext”, but I do not want to remove the letters “-erior” from those wall types starting with the word “Interior.” That post, if I follow it step-by-step, will remove all “-erior” instances, as shown in the far-right node below. Instead of the code blocks which cause subtraction to occur, is there a way I can replace instances of “Exterior” with “Ext”?

There should be a String.Replace.

The String.Replace node is not playing well with the SetParameterByName node (see the image in my original post), and it has no input on the SetName node. Tying the String.Replace set of nodes to the Element.SetName node only provides me with a list of the wall instances and does not change the Type names. See the image below, where the string node with “Type Name” is orphaned. Is there something more specific you are thinking would work? More elaboration and an image of a working graph would be quite helpful.

Also by selecting the WallTypes this way you get all the available Wall Types in the file, not just the ones in use.

1 Like

You need to connect the ElementType node to the SetName node, right now you are trying to rename the individual walls which won’t work.

This is it, thank you! I especially appreciate you pointing out how to change the names of all wall types, not just those which exist in the model.

I have one more question: the curtain wall types and stacked wall types have not been renamed, as shown below. Do you know why? I searched the Element Types node for a Curtain Wall Type selection and then for a Stacked Wall Type selection but found neither. Are curtain walls and stacked walls not contained in Dynamo’s WallType selection of the Element Types node?

This works well, thank you. I will keep this in mind when I only want to change those walls which are of the types used in the model. Despite what my original graph’s image shows, I also in this case want to change those wall types which I have not [yet] used. If this forum supported having two solutions, I would also mark your post as such.

They are selected otherwise their names would not be in that list.

If the rename action is failing it might be that they need to be called differently and the Clockwork Node does not do that. That is just my best guess though.

Good point, I had not thought that the node may not perform that action. I appreciate your response.