Rebar
Compute
|
Computes the spacings between all bars as we would have a set with CustomSpacing layout, the customSpacingFormula and its length being distributionLength.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
public static IList<double> ComputeSpacingsBetweenBars(
Document document,
string customSpacingFormula,
double distributionLength
)
Parameters
- document Document
- A document.
- customSpacingFormula String
- The formula to be used to compute spacings.
- distributionLength Double
- The length along which the bars will be distributed. This length will be used only if the formula contains "?" or percentages.
Return Value
IList DoubleReturns the spacings between all bars in set. If the bars doesn't fit in the input distributionLength, the returned array will be empty.
| Exception | Condition |
|---|---|
| ArgumentException | The specified formula is not valid (doesn't have a valid syntax). |
| ArgumentNullException | A non-optional argument was null |
| ArgumentOutOfRangeException | The given value for distributionLength must be positive. |