Rename a wall type name in different model one time

I have a wall which using in Tower A ,Tower B, Tower C… Now I want to change the type name of the wall ( e.g. Basic Wall 200mm >> Wal-Concrete-200mm)
I have already rename thoese wall in Tower A, but I don’t want to do it again in Tower B,C,D…
Is there any way to do this?

@sb1102222 yes there is a way to do this. In dynamo you need to programm every small step you actually do in Revit. There is also a topic about this from a while back on the forum Rename Wall Types

are towers B, C another models?

Thank you, I read the post but not my issue

For example:
Basic Wall
Generic-200mm is used in Tower A, Tower B, Tower C…D…E (Different Model)

Now I have to change Generic-200mm to Wal-200mm.
I already change the family type name in Tower A, but I have to do it in Tower B.C.D.
Is there any way to solve it?

Yes! I don’t want to repeat the same process in different model again…

I think the post @Matthijs linked is exactly what you need

that only set current model but not external models
you still need to open all models one by one

you can try this:
just browse for a folder which contains all of your tower models:
click run then every models will be updated, without manually open one by one

import os
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager 
from RevitServices.Transactions import TransactionManager

clr.AddReference("RevitAPI")

import Autodesk 
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication 
app = uiapp.Application 
uidoc = uiapp.ActiveUIDocument

dir = IN[0]
files = []
for file in os.listdir(dir):
	if file.endswith(".rvt"):
		files.append(os.path.join(dir, file))

TransactionManager.Instance.ForceCloseTransaction()
for p in files:
	opendoc = app.OpenDocumentFile(p)
	TransactionManager.Instance.EnsureInTransaction(opendoc)
	walls = FilteredElementCollector(opendoc).OfCategory(BuiltInCategory.OST_Walls).WhereElementIsElementType().ToElements()
	for w in walls:
		try:
			if w.Name == "Basic Wall 200mm":
				w.Name = "Wal-Concrete-200mm"
		except:
			pass
	TransactionManager.Instance.ForceCloseTransaction()
	opendoc.Close(True)

OUT = 1
1 Like

Sorry, maybe I need to define it clearly.
There is not only one wall type to change…
Wall type a… to z
E.g
Generic-200 >> Wal-Concrete-200mm
RC_WALL-300 >> Wal-Concrete-200mm

Then principle from @newshunhk is right and you can use that to define the walls. Only add the walltypes as a string to the list.

you can modify this to:

try:
	if w.Name == "Basic Wall 200mm":
		w.Name = "Wal-Concrete-200mm"
	elif w.Name == "another wall name":
		w.Name = "New wall name"

This is a good solution! Um…my models save at bim360, is it possible?

um…maybe it needs Forge DM API… sorry I don’t know

Anyway, Thank you so much!

1 Like

Do you know any nodes can clear the string of family type name?
e.g.
Generic-200 >> Wal-Concrete-200mm
RC_WALL-300 >> Wal-Concrete-200mm

All original wall type name will be replaced by a fix name Wal-Concrete-Wallwidth.
I want to make a dynamo script to clear the original faimly type name, then replace a fix name (xxx-xxx-width).

the above code will fix your problem, why you are asking again?

Python code is an advance method for me,I would like to know the dynamo method first.
Also, if…elif… is a good method but not exactly solve my problem(rename the type name rather than replace it).
Anyway,I appreciate your answer!