CreateFromRebar Method


Computation Data For 3DPath Set Create From Rebar Method

Creates a new instance of the ComputationDataFor3DPathSet class from the provided Rebar element.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public static ComputationDataFor3DPathSet CreateFromRebar(
	Rebar rebar,
	int barPositionIndex
)

Parameters

rebar Rebar
The rebar element from which the data will be obtained.
barPositionIndex Int32
The index of the bar. Should be a number between 0 and Rebar.NumberOfBarPositions - 1.

Return Value

ComputationDataFor3DPathSet
Returns a new instance of the ComputationDataFor3DPathSet class.
Exceptions
Exception Condition
ArgumentException barPositionIndex should be a number between 0 and Rebar.NumberOfBarPositions - 1. -or- rebar should have coplanar curves.
ArgumentNullException A non-optional argument was null
Remarks
When setting the data from a rebar, the curves are extracted from the bar at index barPositionIndex. The terminations in the 3D Path set will be oriented similarly to the terminations in the rebar.
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 →