GetShapeIdAtIndex Method


Rebar Free Form Accessor Get Shape Id At Index Method

Gets the Rebar Shape id for the bar with index barPositionIndex.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public ElementId GetShapeIdAtIndex(
	int barPositionIndex
)

Parameters

barPositionIndex Int32
An index between 0 and (NumberOfBarPositions-1).

Return Value

ElementId
Gets the ElementId of the Rebar Shape for the bar with index barPositionIndex.
Exceptions
Exception Condition
ArgumentOutOfRangeException barPositionIndex is not in the range [ 0, NumberOfBarPositions-1 ]. -or- The bar at barPositionIndex index is excluded.
Remarks
If this function is called for a bar that isn't included, this function will throw exception.
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 →