FamilyManager.Types Property

FamilyManagerTypes Property

All family types in the family.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public FamilyTypeSet Types { get; }
Public ReadOnly Property Types As FamilyTypeSet
	Get
public:
property FamilyTypeSet^ Types {
	FamilyTypeSet^ get ();
}
member Types : FamilyTypeSet with get

Property Value

FamilyTypeSet
Example
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);
    }
}
Public Sub GetFamilyTypesInFamily(familyDoc As Document)
    If familyDoc.IsFamilyDocument Then
        Dim familyManager As FamilyManager = familyDoc.FamilyManager

        ' get types in family
        Dim types As String = "Family Types: "
        Dim familyTypes As FamilyTypeSet = familyManager.Types
        Dim familyTypesItor As FamilyTypeSetIterator = familyTypes.ForwardIterator()
        familyTypesItor.Reset()
        While familyTypesItor.MoveNext()
            Dim familyType As FamilyType = TryCast(familyTypesItor.Current, FamilyType)
            types += vbLf + familyType.Name
        End While
        TaskDialog.Show("Revit", types)
    End If
End Sub

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also