CreateAdaptiveComponentInstance Method


Creates a FamilyInstance of Adaptive Component Family.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)
Since: 2012

Syntax

C#
public static FamilyInstance CreateAdaptiveComponentInstance(
	Document doc,
	FamilySymbol famSymb
)
Visual Basic
Public Shared Function CreateAdaptiveComponentInstance ( _
	doc As Document, _
	famSymb As FamilySymbol _
) As FamilyInstance
Visual C++
public:
static FamilyInstance^ CreateAdaptiveComponentInstance(
	Document^ doc, 
	FamilySymbol^ famSymb
)

Parameters

doc
Type: Autodesk.Revit.DB Document
The Document
famSymb
Type: Autodesk.Revit.DB FamilySymbol
The FamilySymbol

Return Value

The Family Instance

Remarks

This method creates an Adaptive FamilyInstance and its PointElement references. The references can be accessed by methods like GetInstancePointElementRefIds(). The PointElement references can be moved, rehosted or manipulated just like any other PointElements. The FamilyInstance would then 'adapt' to these references.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The element famSymb was not found in the given document. -or- The Symbol famSymb is not an Adaptive Family Symbol.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException Unable to create adaptive component instance.

See Also