RebarAreBarIndicesValidForSplit Method

Verifies that all bar indices in the input set are within the valid range of [0, NumberOfBarPositions - 2].

For a 3D Path or Morphed Free Form Rebar, single layout Rebar sets cannot result from a split, so the bar indices in the input set must not be consecutive.

For a 3D Path Free Form Rebar, this also validates that each new set created by the split will have at least one bar plane intersecting a path edge.


Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public static bool AreBarIndicesValidForSplit(
	Document document,
	ElementId elementIdToCheck,
	ISet<int> barIndices
)

Parameters

document  Document
The document.
elementIdToCheck  ElementId
The elementId to check.
barIndices  ISetInt32
The set of bar indices to validate.

Return Value

Boolean
Returns true if the validation is successful, false otherwise.
Exceptions
ExceptionCondition
ArgumentException Free Form Rebars other than 3D Path or Morphed, rebar sets with only one bar included or rebars that are part of a group can't be split. Morphed Free Form Rebars that targets Spiral or Lapped Circle shapes can't be split.
ArgumentNullException A non-optional argument was null
See Also