This object represents a single instance of a family type, such as a single I beam.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Syntax
Remarks
Examples of FamilyInstance objects within Autodesk Revit are Beams, Columns, Braces and Desks. The FamilyInstance object provides more detailed properties that enable the type of the family instance to be changed, thus changing their appearance within the project.
Examples

public void GetInfo_FamilyInstance(FamilyInstance familyInstance)
{
string message = "FamilyInstance : ";
// Get FamilyInstance host name
if (familyInstance.Host != null)
{
message += "\nFamilyInstance host name is : " + familyInstance.Host.Name;
}
foreach (ElementId materialId in familyInstance.GetMaterialIds(false))
{
Material material = familyInstance.Document.GetElement(materialId) as Material;
message += "\nFamilyInstance e material : " + material.Name;
}
// Get FamilyInstance room name
if (familyInstance.Room != null)
{
message += "\nFamilyInstance room name is : " + familyInstance.Room.Name;
}
// Get FamilyInstance structural type
message += "\nFamilyInstance structural type is : " + familyInstance.StructuralType;
// Get FamilyInstance structural usage
message += "\nFamilyInstance structural usage is : " + familyInstance.StructuralUsage;
TaskDialog.Show("Revit",message);
}

Public Sub GetInfo_FamilyInstance(familyInstance As FamilyInstance)
Dim message As String = "FamilyInstance : "
' Get FamilyInstance host name
If familyInstance.Host IsNot Nothing Then
message += vbLf & "FamilyInstance host name is : " & Convert.ToString(familyInstance.Host.Name)
End If
For Each materialId As ElementId In familyInstance.GetMaterialIds(False)
Dim material As Material = TryCast(familyInstance.Document.GetElement(materialId), Material)
message += vbLf & "FamilyInstance e material : " + material.Name
Next
' Get FamilyInstance room name
If familyInstance.Room IsNot Nothing Then
message += vbLf & "FamilyInstance room name is : " & Convert.ToString(familyInstance.Room.Name)
End If
' Get FamilyInstance structural type
message += vbLf & "FamilyInstance structural type is : " & Convert.ToString(familyInstance.StructuralType)
' Get FamilyInstance structural usage
message += vbLf & "FamilyInstance structural usage is : " & Convert.ToString(familyInstance.StructuralUsage)
TaskDialog.Show("Revit", message)
End Sub
Inheritance Hierarchy
SystemObject
Autodesk.Revit.DBElement
Autodesk.Revit.DBInstance
Autodesk.Revit.DBFamilyInstance
Autodesk.Revit.DBAnnotationSymbol
Autodesk.Revit.DBMullion
Autodesk.Revit.DBPanel
Autodesk.Revit.DBElement
Autodesk.Revit.DBInstance
Autodesk.Revit.DBFamilyInstance
Autodesk.Revit.DBAnnotationSymbol
Autodesk.Revit.DBMullion
Autodesk.Revit.DBPanel