DocumentSetDefaultFamilyTypeId Method |
Sets the default family type id for the given family category.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic void SetDefaultFamilyTypeId(
ElementId familyCategoryId,
ElementId familyTypeId
)
Public Sub SetDefaultFamilyTypeId (
familyCategoryId As ElementId,
familyTypeId As ElementId
)
public:
void SetDefaultFamilyTypeId(
ElementId^ familyCategoryId,
ElementId^ familyTypeId
)
member SetDefaultFamilyTypeId :
familyCategoryId : ElementId *
familyTypeId : ElementId -> unit
Parameters
- familyCategoryId ElementId
-
The family category id.
- familyTypeId ElementId
-
The default family type id.
Exceptions
Exampleprivate void SetDefaultTypeFromDoor(Document document, FamilyInstance door)
{
ElementId doorCategoryId = new ElementId(BuiltInCategory.OST_Doors);
if (door.Symbol.IsValidDefaultFamilyType(doorCategoryId))
{
document.SetDefaultFamilyTypeId(doorCategoryId, door.Symbol.Id);
}
}
Private Sub SetDefaultTypeFromDoor(document As Document, door As FamilyInstance)
Dim doorCategoryId As New ElementId(BuiltInCategory.OST_Doors)
If door.Symbol.IsValidDefaultFamilyType(doorCategoryId) Then
document.SetDefaultFamilyTypeId(doorCategoryId, door.Symbol.Id)
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