Revit 2026 API
Family |
Converts a family to be face host based.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static void ConvertFamilyToFaceHostBased( Document document, ElementId familyId )
Public Shared Sub ConvertFamilyToFaceHostBased ( document As Document, familyId As ElementId )
public: static void ConvertFamilyToFaceHostBased( Document^ document, ElementId^ familyId )
static member ConvertFamilyToFaceHostBased : document : Document * familyId : ElementId -> unit
Parameters
| Exception | Condition |
|---|---|
| ArgumentException | The input familyId cannot be converted to face host based. |
| ArgumentNullException | A non-optional argument was null |
| InvalidOperationException | Failed to convert the family to face host based. -or- The family is already unhosted. |
Converts a family hosted by some element other than a face to be hosted by a face. This is done by replacing the existing host (wall, roof, ceiling, floor) with a face.
Conversion can succeed only if FamilyUtils.FamilyCanConvertToFaceHostBased() returns true.
See Also