AdaptiveComponentInstanceUtils Class |
An interface for Adaptive Component Instances.
Inheritance HierarchySystemObject Autodesk.Revit.DBAdaptiveComponentInstanceUtils Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static class AdaptiveComponentInstanceUtils
Public NotInheritable Class AdaptiveComponentInstanceUtils
public ref class AdaptiveComponentInstanceUtils abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type AdaptiveComponentInstanceUtils = class end
The AdaptiveComponentInstanceUtils type exposes the following members.
Methods
Exampleprivate void CreateAdaptiveComponentInstance(Document document, FamilySymbol symbol)
{
FamilyInstance instance = AdaptiveComponentInstanceUtils.CreateAdaptiveComponentInstance(document, symbol);
IList<ElementId> placePointIds = new List<ElementId>();
placePointIds = AdaptiveComponentInstanceUtils.GetInstancePlacementPointElementRefIds(instance);
double x = 0;
foreach (ElementId id in placePointIds)
{
ReferencePoint point = document.GetElement(id) as ReferencePoint;
point.Position = new Autodesk.Revit.DB.XYZ(10*x, 10*Math.Cos(x), 0);
x += Math.PI/6;
}
}Private Sub CreateAdaptiveComponentInstance(document As Document, symbol As FamilySymbol)
Dim instance As FamilyInstance = AdaptiveComponentInstanceUtils.CreateAdaptiveComponentInstance(document, symbol)
Dim placePointIds As IList(Of ElementId) = New List(Of ElementId)()
placePointIds = AdaptiveComponentInstanceUtils.GetInstancePlacementPointElementRefIds(instance)
Dim x As Double = 0
For Each id As ElementId In placePointIds
Dim point As ReferencePoint = TryCast(document.GetElement(id), ReferencePoint)
point.Position = New Autodesk.Revit.DB.XYZ(10 * x, 10 * Math.Cos(x), 0)
x += Math.PI / 6
Next
End SubNo code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also