AddBarGeometry Method (CurveLoop)


Adds a new rebar geometry. This information is set to the rebar after the API execution is finished successfully.

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

Syntax

C#
public RebarFreeFormValidationResult AddBarGeometry(
	CurveLoop curves
)
Visual Basic
Public Function AddBarGeometry ( _
	curves As CurveLoop _
) As RebarFreeFormValidationResult
Visual C++
public:
RebarFreeFormValidationResult AddBarGeometry(
	CurveLoop^ curves
)

Parameters

curves
Type: Autodesk.Revit.DBCurveLoop
Curves describing one bar in the set.

Return Value

Returns Success if everything is ok, otherwise the failure reason.

Remarks

This function can fail due to following reasons:

  • CurveLoop is empty.
  • CurveLoop contains an unbounded curve.
  • A rebar constructed from curves can't be bent according to the bending radius.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Incorrect number of bar geometry.

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 →