Conditions
The conditions for creating the bracket are partly specified in label 3 and in label 5. These depend on the dimensions of the selected parts. For example:
if angle > 30 then
{
if HP[2]= 80 & DP[2]=7 : stand='801'; exit
if HP[2]= 100& DP[2]=8 : stand='802'; exit
}
else
{
MakeBracket='No'
BrMessage='The angle between the parts is too small'
}
If Angle (the angle between the two main axes) is greater than 30, one of the following situations may occur:
- If the height of the profile selected as the second part (HP[2]) is 80 and its thickness (DP[2]) is 7, the bracket is a standard bracket with Stand='801';
- If the height of the profile selected as the second part is 100 and its thickness is 8, the bracket is a standard bracket with Stand='802';
- If none of these conditions is met, the bracket will become a free bracket.
If Angle is smaller than 30, MakeBracket is set to No. This ensures that the bracket will not be created. The BrMessage variable may then be set to a message explaining why the bracket could not be created. A panel containing this message and an OK button will then be displayed.
The Stand variable contains the selected standard and thus indicates whether the bracket to be created is a free bracket (Stand='free') or a bracket with certain standard dimensions. Before the type macro is interpreted, Stand is set to 'free'. If the value of this variable does not change somewhere in the macro, a free bracket will be created.
Note: If a free bracket should be created, Stand must equal 'free'.
In label 5 all information is gathered and a last check can be performed in which it is decided whether the bracket will be created or the not. For example:
label5
VarStr='TYPE ^BracketNumber R1'<Ans[1]>' R2 '<Ans[2]>' D '<Ans[3]>
VarStr2=' FB 75 FE1 1 FE2 1 F1R2 45 F2R2 45 FC 475'
if abs(Ans[3])*4 < HP[1] | HP[1]=0 : Ready='ready'
if abs(Ans[3])*4>= HP[1] & HP[1]>0 then
{
notify t=ERR;'The thickness of the bracket is too big !!
}
exit
In this example the bracket will be created only when the condition abs(Ans[3])*4 < HP[1] | HP[1]=0 is fulfilled.
The bracket is created only if the variable Ready has the value ready. See the Creation of the bracket paragraph.