How to rename the Appearance Information Names in the Material Brower

I’m really a beginner. There are bunch of Information Names have to be renamed in the Material Brower. What I need is to change the names in red lines from “Poche” to “Redfab”. How could I change them in dynamo? Thank you so much!!
question
I got one dyn file from the Internet to rename the Material names but I don’t know how to rename the Appearance Information Names. :frowning:

Python Script:

import clr
from System.Collections.Generic import *

clr.AddReference(‘RevitNodes’)
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference(‘RevitAPI’)
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference(‘RevitServices’)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

name=IN[0]
newName=IN[1]
TransactionManager.Instance.EnsureInTransaction(doc)
materialCategoryfilter = ElementCategoryFilter(BuiltInCategory.OST_Materials)
collector = FilteredElementCollector(doc)
materials = collector.WherePasses(materialCategoryfilter)
TransactionManager.Instance.TransactionTaskDone()

out=
for i in materials:
maName=i.Name
if name in maName:
i.Name=maName.replace(name,newName)
out.append(i.Name)

OUT = out

try this
Package from genius Loci and Clockwork

2 Likes

Thanks myrwen.junterealSJC7
Maybe I did not explain clearly or did something wrong. I tried your suggestion but changed one “Information Name” only. How could I change them all in one time? As the image below.
question
Thanks again!

There are much more tasks I just found. Is it possible to reassign the path with the new texture file names in Dynamo? Anyway, thanks a lot!
question+++

Use the Material Change Texture Path node for this task.
Material Change Texture Path

Thanks Alban_de_Chasteigner. I’m really a beginner. Could you please give me more tips? What I could do is just stopping there. As the picture:


Thanks again!

I got it! Thanks Alban_de_Chasteigne and myrwen.junterealSJC7, thank you so much!!!