AdaptiveComponentFamilyUtils Class

An interface for Adaptive Component Instances.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBAdaptiveComponentFamilyUtils

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static class AdaptiveComponentFamilyUtils

The AdaptiveComponentFamilyUtils type exposes the following members.

Methods
 NameDescription
Public methodStatic memberGetNumberOfAdaptivePoints Gets number of Adaptive Point Elements in Adaptive Component Family.
Public methodStatic memberGetNumberOfPlacementPoints Gets number of Placement Point Elements in Adaptive Component Family.
Public methodStatic memberGetNumberOfShapeHandlePoints Gets number of Shape Handle Point Elements in Adaptive Component Family.
Public methodStatic memberGetPlacementNumber Gets Placement number of an Adaptive Placement Point.
Public methodStatic memberGetPointConstraintType Gets constrain type of an Adaptive Shape Handle Point.
Public methodStatic memberGetPointOrientationType Gets orientation type of an Adaptive Placement Point.
Public methodStatic memberIsAdaptiveComponentFamily Verifies if the Family is an Adaptive Component Family.
Public methodStatic memberIsAdaptivePlacementPoint Verifies if the Reference Point is an Adaptive Placement Point.
Public methodStatic memberIsAdaptivePoint Verifies if the Reference Point is an Adaptive Point.
Public methodStatic memberIsAdaptiveShapeHandlePoint Verifies if the Reference Point is an Adaptive Shape Handle Point.
Public methodStatic memberMakeAdaptivePoint Makes Reference Point an Adaptive Point or makes an Adaptive Point a Reference Point.
Public methodStatic memberSetPlacementNumber Sets Placement Number of an Adaptive Placement Point.
Public methodStatic memberSetPointConstraintType Sets constrain type of an Adaptive Shape Handle Point.
Public methodStatic memberSetPointOrientationType Sets orientation type of an Adaptive Placement Point.
Top
Example
private void CreateAdaptiveComponentFamily(Document document)
{
    // check if this family is an Adaptive Component family
    if (!(AdaptiveComponentFamilyUtils.IsAdaptiveComponentFamily(document.OwnerFamily))) return;
    using (Transaction transaction = new Transaction(document))
    {
       int placementCtr = 1;
       ReferencePointArray refPointArray = new ReferencePointArray();
       for (int i = 0; i < 10; i++)
       {
           transaction.SetName("Point" + i);
           transaction.Start();
           ReferencePoint referencePoint = document.FamilyCreate.NewReferencePoint(new XYZ(i, 0, 0));
           if (i % 2 == 0)
           // Even-numbered reference points will be Placement Points
           {
               AdaptiveComponentFamilyUtils.MakeAdaptivePoint(document, referencePoint.Id, AdaptivePointType.PlacementPoint);
               transaction.Commit();
               AdaptiveComponentFamilyUtils.SetPlacementNumber(document, referencePoint.Id, placementCtr);
               placementCtr++;
           }
           else
           // Odd-numbered points will be Shape Handle Points
           {
               AdaptiveComponentFamilyUtils.MakeAdaptivePoint(document, referencePoint.Id, AdaptivePointType.ShapeHandlePoint);
               transaction.Commit();
           }
           refPointArray.Append(referencePoint);
       }
       // Create a curve running through all Reference Points
       if (transaction.GetStatus() == TransactionStatus.Committed)
       {
          transaction.SetName("Curve");
          transaction.Start();
          CurveByPoints curve = document.FamilyCreate.NewCurveByPoints(refPointArray);
          transaction.Commit();
       }
    }
}
See Also