GetCurve Method


Returns the curve of the Analytical Element.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2023

Syntax

C#
public Curve GetCurve()
Visual Basic
Public Function GetCurve As Curve
Visual C++
public:
Curve^ GetCurve()

Return Value

The curve of the Analytical Element.

Remarks

If the Analytical Element cannot be expressed as a single curve, an exception is thrown.

Examples

CopyC#
public void GetColumnCurve(AnalyticalElement member)
{
   // get AnalyticalElement from structural column
   if (member.StructuralRole == AnalyticalStructuralRole.StructuralRoleColumn)
   {
      // column should be represented by a single curve
      if (member.IsSingleCurve() == true)
      {
         Curve columnCurve = member.GetCurve();
      }
   }
}

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsInapplicableDataException This AnalyticalElement contains more than one single curve.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →