Family |
All family types in the family.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)


public void GetFamilyTypesInFamily(Document familyDoc)
{
if (familyDoc.IsFamilyDocument)
{
FamilyManager familyManager = familyDoc.FamilyManager;
// get types in family
string types = "Family Types: ";
FamilyTypeSet familyTypes = familyManager.Types;
FamilyTypeSetIterator familyTypesItor = familyTypes.ForwardIterator();
familyTypesItor.Reset();
while (familyTypesItor.MoveNext())
{
FamilyType familyType = familyTypesItor.Current as FamilyType;
types += "\n" + familyType.Name;
}
TaskDialog.Show("Revit",types);
}
}
