2027 Method
Changes 0
M

FamilyItemFactory.NewCurveByPoints

Description:
Create a 3d curve through two or more points in an Autodesk Revit family document.
public CurveByPoints NewCurveByPoints(
	ReferencePointArray points
)
  • points
    Two or more PointElements. The curve will interpolate these points.
Return Value CurveByPoints The newly created curve.
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);