Namespace:
Autodesk.Revit.DB
FamilyInstance
Class
Description:
This object represents a single instance of a family type, such as a single I beam.
This object represents a single instance of a family type, such as a single I beam.
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 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.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Instance
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.AnnotationSymbol
Autodesk.Revit.DB.Mullion
Autodesk.Revit.DB.Panel
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Instance
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.AnnotationSymbol
Autodesk.Revit.DB.Mullion
Autodesk.Revit.DB.Panel
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);
}