ReinfHookLength

The value type ReinfHookLength is used to create an edit field for a hook length value that is displayed in the current Allplan length input unit.

../../../../_images/ReinfHookLength.png

Syntax

<Parameter>
<Name>BarHookLength</Name>
<Text>Hook length</Text>
<Value>-1</Value>
<ValueType>ReinfHookLength</ValueType> <Constraint> BarDiameter;SteelGrade;ConcreteGrade;BarHookAngle;__ReinfHookType__ = BarHookType</Constraint>
</Parameter>

If the <Value> tag is set to -1, the initial value is calculated using the values from the constraint parameters.

In the <Constraint> tag the names of the parameters with the value types ReinfBarDiameter, ReinfSteelGrade, ReinfConcreteGrade, Angle and ReinfMeshType can be assigned. With the values from these parameters the value for the hook length is calculated.

If no parameter is available

  • the value can be assigned directly in the format __xxx__ = 90, e.g. __Angle__ = 90.

  • the value for the angle is set to 90 degree

  • the value for ReinfBarDiameter, ReinfSteelGrade, ReinfConcreteGrade or ReinfMeshType is initialized with the value currently used in Allplan.

When the value of a constraint parameter is changed, the hook length is recalculated. If required, it’s also possible to overwrite these value by a direct input.

Optional tags

Sometimes it’s useful to disable or hide the controls depending on the value of another parameter. This is achieved by adding additional tags to the parameter or by defining functions in the py-file. See Enable and visible options

The persistent state of the parameter can be changed by adding

<Persistent></Persistent>

Example

The implementation of the ReinfHookLength value type is described in the example HookLengthConstraint located in

…\etc\Examples\PythonParts\ReinforcementExamples\HookLengthConstraint.pyp
…\etc\PythonPartsExampleScripts\ReinforcementExamples\HookLengthConstraint.py