Cutout & lugs section
However, in the case of cutouts and lugs, the profile height and thickness usually determine which variables should be sent to the construction database. A label 5 has been added to the type macro for this special case.
Label 5 only applies to cutouts and lugs, since the cutout (and therefore lugs also) is created around a profile. The dimensions of this profile are known when label 5 is executed, which makes it possible to assign the R variables in accordance with the profile type.
Cutout variables
With cutouts, the linking of the R variables to the answers given is divided into two parts. The first part consists of the answers given under labels 1 to 3. These variables are stored in the VarStr variable. The second part is the storing of the R variables. These are usually calculated or determined by the dimensions and type of the profile. These R variables are stored in the VarCutOut string.
In label 5, several variables calculated by CADMATIC Hull are already known. These are:
Prof_type | This (string) variable stores the complete name of the profile type. For a holland profile, this may be HP200X10. |
Prof_height | This (numerical) variable stores the nominal profile height. |
Prof_flange | This (numerical) variable stores the profile's flange width. |
These variables are useful for calculating the R variables, of which the following is an example.
if prof_type[1\2]='hp' then
{
# It is a bulb flat (HP)
if prof_height=80 :varcutout='r1 35 r2 56 r3 2 r4 10 r5 70 '
if prof_height=100 :varcutout='r1 35 r2 59 r3 2 r4 10 r5 70 '
if prof_height=120 :varcutout='r1 35 r2 60 r3 2 r4 10 r5 75 '
if prof_height=140 :varcutout='r1 35 r2 63 r3 2 r4 10 r5 75 '
if prof_height=400 :varcutout='r1 35 r2 110 r3 2 r4 10 r5 85 '
if prof_height=430 :varcutout='r1 35 r2 119 r3 2 r4 10 r5 85 '
}
if prof_type[1\2]='hg' |prof_type[1\2]='ho' then
{
varcutout='r1 35 r3 2 r2 '<prof_flange+35>' r4 10 r5 50 '
}
if prof_type[1\2]='st' then
{
varcutout='r1 35 r3 2 r2 75 r4 10 r5 50 '
}
Lug variables
The same variables as for cutouts as described above can be used at label 5 of a lug type macro, but with the following differences:
- use VarLug instead of VarCutOut
- use r9 - rg instead of r1 - r8
Consult the Eagle syntax manual for an explanation of the 'if' command. |
Always ensure that all opening parentheses { you have used are balanced by closing parentheses }. Failure to do so might lead to glitches and errors. |