Revit 2025 API
Family |
Create a 3d curve through two or more points in an Autodesk
Revit family document.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public CurveByPoints NewCurveByPoints( ReferencePointArray points )
Public Function NewCurveByPoints ( points As ReferencePointArray ) As CurveByPoints
public: CurveByPoints^ NewCurveByPoints( ReferencePointArray^ points )
member NewCurveByPoints : points : ReferencePointArray -> CurveByPoints
Parameters
- points ReferencePointArray
- Two or more PointElements. The curve will interpolate these points.
Return Value
CurveByPointsThe newly created curve.
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown when points is . |
| ArgumentException | Thrown when points does not contain at least two PointElements. |
| InvalidOperationException | Thrown when the family is not a Conceptual Mass Family. |
ReferencePointArray rpa = new ReferencePointArray(); XYZ xyz = document.Application.Create.NewXYZ(0, 0, 0); ReferencePoint rp = document.FamilyCreate.NewReferencePoint(xyz); rpa.Append(rp); xyz = document.Application.Create.NewXYZ(0, 30, 10); rp = document.FamilyCreate.NewReferencePoint(xyz); rpa.Append(rp); xyz = document.Application.Create.NewXYZ(0, 60, 0); rp = document.FamilyCreate.NewReferencePoint(xyz); rpa.Append(rp); xyz = document.Application.Create.NewXYZ(0, 100, 30); rp = document.FamilyCreate.NewReferencePoint(xyz); rpa.Append(rp); xyz = document.Application.Create.NewXYZ(0, 150, 0); rp = document.FamilyCreate.NewReferencePoint(xyz); rpa.Append(rp); curve = document.FamilyCreate.NewCurveByPoints(rpa);
Dim rpa As New ReferencePointArray() Dim xyz As XYZ = document.Application.Create.NewXYZ(0, 0, 0) Dim rp As ReferencePoint = document.FamilyCreate.NewReferencePoint(xyz) rpa.Append(rp) xyz = document.Application.Create.NewXYZ(0, 30, 10) rp = document.FamilyCreate.NewReferencePoint(xyz) rpa.Append(rp) xyz = document.Application.Create.NewXYZ(0, 60, 0) rp = document.FamilyCreate.NewReferencePoint(xyz) rpa.Append(rp) xyz = document.Application.Create.NewXYZ(0, 100, 30) rp = document.FamilyCreate.NewReferencePoint(xyz) rpa.Append(rp) xyz = document.Application.Create.NewXYZ(0, 150, 0) rp = document.FamilyCreate.NewReferencePoint(xyz) rpa.Append(rp) curve = document.FamilyCreate.NewCurveByPoints(rpa)
No 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