SetOuterContour Method


Sets the Curve Loop that defines the geometry of the Analytical Surface 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 void SetOuterContour(
	CurveLoop outerContour
)
Visual Basic
Public Sub SetOuterContour ( _
	outerContour As CurveLoop _
)
Visual C++
public:
void SetOuterContour(
	CurveLoop^ outerContour
)

Parameters

outerContour
Type: Autodesk.Revit.DBCurveLoop
New Curve Loop for the Analytical Surface element.

Remarks

Curve Loop must be planar and not self-intersecting.

Examples

CopyC#
   using (Transaction transaction = new Transaction(document, "Edit Analytical Panel outer contour"))
   {
      transaction.Start();

      //create a new curve loop
      CurveLoop profileloop = new CurveLoop();
      profileloop.Append(Line.CreateBound(
         new XYZ(0, 0, 0), new XYZ(5, 0, 0)));
      profileloop.Append(Line.CreateBound(
         new XYZ(5, 0, 0), new XYZ(5, 5, 0)));
      profileloop.Append(Line.CreateBound(
         new XYZ(5, 5, 0), new XYZ(-2, 5, 0)));
      profileloop.Append(Line.CreateBound(
         new XYZ(-2, 5, 0), new XYZ(0, 0, 0)));

      //Sets the new contour for analytical panel
      analyticalPanel.SetOuterContour(profileloop);

      transaction.Commit();
   }
}
CopyVB.NET
    Using transaction As Transaction = New Transaction(document, "Edit Analytical Panel outer contour")
        transaction.Start()

        'create a new curve loop
        Dim profileloop As CurveLoop = New CurveLoop()
        profileloop.Append(Line.CreateBound(New XYZ(0, 0, 0), New XYZ(5, 0, 0)))
        profileloop.Append(Line.CreateBound(New XYZ(5, 0, 0), New XYZ(5, 5, 0)))
        profileloop.Append(Line.CreateBound(New XYZ(5, 5, 0), New XYZ(-2, 5, 0)))
        profileloop.Append(Line.CreateBound(New XYZ(-2, 5, 0), New XYZ(0, 0, 0)))

        'Sets the new contour for analytical panel
        analyticalPanel.SetOuterContour(profileloop)
        transaction.Commit()
    End Using
End If
CopyVB.NET
    Using transaction As Transaction = New Transaction(document, "Edit Analytical Panel outer contour")
        transaction.Start()

        'create a new curve loop
        Dim profileloop As CurveLoop = New CurveLoop()
        profileloop.Append(Line.CreateBound(New XYZ(0, 0, 0), New XYZ(5, 0, 0)))
        profileloop.Append(Line.CreateBound(New XYZ(5, 0, 0), New XYZ(5, 5, 0)))
        profileloop.Append(Line.CreateBound(New XYZ(5, 5, 0), New XYZ(-2, 5, 0)))
        profileloop.Append(Line.CreateBound(New XYZ(-2, 5, 0), New XYZ(0, 0, 0)))

        'Sets the new contour for analytical panel
        analyticalPanel.SetOuterContour(profileloop)
        transaction.Commit()
    End Using
End If

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException One of the following requirements is not satisfied : - curve loop outerContour is not planar - curve loop outerContour is self-intersecting - curve loop outerContour contains zero length curves
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Only planar surfaces can be edited.

See Also