Document
Get
|
Gets the default family type id with the given family category id.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Parameters
- familyCategoryId ElementId
- The family category id.
Return Value
ElementIdThe default family type id.
| Exception | Condition |
|---|---|
| ArgumentException | familyCategoryId is not a built in category or parameter Element ID. |
| ArgumentNullException | A non-optional argument was null |
C#
private void AssignDefaultTypeToColumn(Document document, FamilyInstance column)
{
ElementId defaultTypeId = document.GetDefaultFamilyTypeId(new ElementId(BuiltInCategory.OST_StructuralColumns));
if (defaultTypeId != ElementId.InvalidElementId)
{
FamilySymbol defaultType = document.GetElement(defaultTypeId) as FamilySymbol;
if (defaultType != null)
{
column.Symbol = defaultType;
}
}
}