SetCrankRatio Method


Rebar Bar Type Set Crank Ratio Method

Sets the crank ratio for the specified Rebar Crank Type.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public void SetCrankRatio(
	ElementId rebarCrankTypeId,
	double crankRatio
)

Parameters

rebarCrankTypeId ElementId
The Rebar Crank Type id. Interactions with Rebar Crank Types can be done with the functions in [!:Autodesk::Revit::DB::Structure::RebarCrankTypeUtils] .
crankRatio Double
The new value of the crank ratio.
Exceptions
Exception Condition
ArgumentException The rebarCrankTypeId doesn't represent a valid Rebar Crank Type. It should be an ElementType of BuiltInCategory.OST_RebarCrankType category. -or- For the specified Rebar Crank Type is auto calculated and the cannot be manually set. -or- The crank parameters cannot be computed for the specified crankRatio and Rebar Crank Type.
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException The given value for crankRatio must be positive.
Remarks
The crank slope is 1/crankRatio. When the crank ratio is set, the crank offset length is keeping the same value. The angled length and straight length are adjusted.
See Also