Converts a family to be face host based.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DBDocument
The document containing the family to be converted.
- familyId
- Type: Autodesk.Revit.DBElementId
The family id.
Remarks
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.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | The input familyId cannot be converted to face host based. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsInvalidOperationException | Failed to convert the family to face host based. -or- The family is already unhosted. |