You can use procedures to define, for example, that the weight of a bicycle is dependent on the material used for the frame and the components selected for the bicycle.
Part 1
You define a procedure for characteristic FRAME_MATERIAL. The value assigned to characteristic FRAME_MATERIAL automatically infers a value for characteristic WEIGHT.
On the Class screen choose the tab page Characteristics . Select characteristic FRAME_MATERIAL and choose Basic data tab page appears.
Choose
You see the dialog box for selecting the dependency type. Select Procedure.
Enter the following source code for your dependency:
$SELF.WEIGHT = 10 if FRAME_MATERIAL = 'aluminum',
$SELF.WEIGHT = 14 if FRAME_MATERIAL = ‘steel’.
Save your source code.
On the basic data tab, you see a pushbutton labeled Dependencies.
Save your characteristic.
Part 2
The weight of the bicycle also depends on which components are selected. For example, if mudguards are selected, the weight increases by 0.5 kg.
You define a procedure for characteristic value 'mudguard' of characteristic EXTRAS.
On the Class screen choose the tab page Characteristics . Select characteristic EXTRAS. Choose Select the value 'mudguard'.
Choose
You see the dialog box for selecting the dependency type. Select Procedure.
Enter the following source code:
$SELF.WEIGHT = $SELF.WEIGHT + 0.5
Save your source code.
The O indicator is selected for this value.
Save your characteristic.
If you assign value 'aluminum' to characteristic FRAME_MATERIAL, the value 10kg is entered for characteristic WEIGHT. If you then assign value 'mudguard' to characteristic EXTRAS, 0.5kg is added to the WEIGHT.