GetCurve Method


Analytical Element Get Curve Method

Returns the curve of the Analytical Element.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public Curve GetCurve()

Return Value

Curve
The curve of the Analytical Element.
Exceptions
Exception Condition
InapplicableDataException This AnalyticalElement contains more than one single curve.
Remarks
If the Analytical Element cannot be expressed as a single curve, an exception is thrown.
Example
C#
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();
      }
   }
}
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 →