ConvertFamilyToFaceHostBased Method


Converts a family to be face host based.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public static void ConvertFamilyToFaceHostBased(
	Document document,
	ElementId familyId
)
Visual Basic
Public Shared Sub ConvertFamilyToFaceHostBased ( _
	document As Document, _
	familyId As ElementId _
)
Visual C++
public:
static void ConvertFamilyToFaceHostBased(
	Document^ document, 
	ElementId^ familyId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document containing the family to be converted.
familyId
Type: Autodesk.Revit.DB ElementId
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.Exceptions ArgumentException The input familyId cannot be converted to face host based.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException Failed to convert the family to face host based. -or- The family is already unhosted.

See Also