Namespace:
Autodesk.Revit.DB
FamilySymbol
Class
Description:
An element that represents a single type with a Family.
An element that represents a single type with a Family.
Remarks:
Custom families within the Revit API represented by three objects - Family, FamilySymbol and FamilyInstance. Each object plays a significant part in the structure of families. The Family element represents the entire family that consists of a collection of types, such as an 'I Beam'. You can think of that object as representing the entire family file. The Family object contains a number of FamilySymbol elements. The FamilySymbol object represents a specific set of family settings within that Family and represents what is known in the Revit user interface as a Type, such as 'W14x32'. The FamilyInstance object represents an actual instance of that type placed the Autodesk Revit project. For example the FamilyInstance would be a single instance of a W14x32 column within the project.
Custom families within the Revit API represented by three objects - Family, FamilySymbol and FamilyInstance. Each object plays a significant part in the structure of families. The Family element represents the entire family that consists of a collection of types, such as an 'I Beam'. You can think of that object as representing the entire family file. The Family object contains a number of FamilySymbol elements. The FamilySymbol object represents a specific set of family settings within that Family and represents what is known in the Revit user interface as a Type, such as 'W14x32'. The FamilyInstance object represents an actual instance of that type placed the Autodesk Revit project. For example the FamilyInstance would be a single instance of a W14x32 column within the project.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementType
Autodesk.Revit.DB.InsertableObject
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.AnnotationSymbolType
Autodesk.Revit.DB.Architecture.RoomTagType
Autodesk.Revit.DB.AreaTagType
Autodesk.Revit.DB.Mechanical.SpaceTagType
Autodesk.Revit.DB.MullionType
Autodesk.Revit.DB.PanelType
Autodesk.Revit.DB.Structure.TrussType
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementType
Autodesk.Revit.DB.InsertableObject
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.AnnotationSymbolType
Autodesk.Revit.DB.Architecture.RoomTagType
Autodesk.Revit.DB.AreaTagType
Autodesk.Revit.DB.Mechanical.SpaceTagType
Autodesk.Revit.DB.MullionType
Autodesk.Revit.DB.PanelType
Autodesk.Revit.DB.Structure.TrussType
Examples
public void GetInfo_FamilySymbol(FamilySymbol familySymbol)
{
string message;
// Get FamilySymbol family name
message = "Family name is : " + familySymbol.Family.Name;
// Get FamilySymbol material
message += "\nFamilySymbol materials are :";
foreach (ElementId matid in familySymbol.GetMaterialIds(true))
{
Material material = familySymbol.Document.GetElement(matid) as Material;
if (null != material)
{
message += "\n" + material.Name;
}
}
TaskDialog.Show("Revit",message);
}