(First time poster)
I’m very new to the Revit API so this could have a very simple answer, but how do I get the name of a ViewFamilyType?
If I create a collector to get all ViewFamilyTypes:
# Collecting all view family types from the model
view_collector = DB.FilteredElementCollector(doc)\
.OfClass(DB.ViewFamilyType)\
.ToElement()
I cannot access the Name parameter:
for view_family_type in view_collector:
name = view_family_type.Name
print(name)
I get:
**Script Executor Traceback:**
System.MissingMemberException: Name
But I can access the FamilyName parameter:
for view_family_type in view_collector:
name = view_family_type.FamilyName
print(name)
Returns “Floor Plan”, etc. as expected.