How do I get the Name of a WallType in PyRevit? I can get to FamilyName, but it's not what I want, I want the exact name of the wall (e.g., '300mm concrete'). The code I use:
from Autodesk.Revit.DB import *
doc = __revit__.ActiveUIDocument.Document
walls = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Walls).\
WhereElementIsElementType().ToElements()
for wall in walls:
print(wall.Name)
You cannot get the
Namefrom aWallTypebecause it inherits fromElementTypeand this class does not include a getter forName.What you could do to retrieve the name is accessing the overriden properties of the object as seen in this other question.
Which you can easily adapt to your code as: