Curve Property


Location Curve Curve Property

Provides the ability to get and set the curve of a curve based element.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public Curve Curve { get; set; }

Property Value

Curve
Remarks
This property can be used to set the location of curve based element to any desired position. Many elements are curve based. Some examples are walls, beams and braces.
Example
C#
void MoveUsingCurveParam(Autodesk.Revit.ApplicationServices.Application application, Wall wall)
{
    LocationCurve wallLine = wall.Location as LocationCurve;
    XYZ p1 = XYZ.Zero;
    XYZ p2 = new XYZ(10, 20, 0);
    Line newWallLine = Line.CreateBound(p1, p2);

    // Change the wall line to a new line.
    wallLine.Curve = newWallLine;
}
See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →