Can CalculiX do a simple math?

valu wallheight 150
valu bnw 30
valu wallthickness 4
valu shelfwidth 150
valu leg 4
bns 60

seto wall
pnt p2 84 4 0
pnt p3 84 4 1000

line l1 p2 p3
seta se1 l l1

swep se1 sesw1 tra wallthickness 0 0

seta sesw2 A00R
swep sesw2 sesw3 tra 0 bnw 0
swep sesw3 sesw4 tra 0 <wallheight - bnw> 0 >>>>>>>there is something wrong with the line
seta onew s A00E

setc wall

plot se wall

I change

valu wallheight 150
valu bnw 30
valu resultw - wallheight bnw


swep sesw3 sesw4 tra 0 resultw 0

This way math is calculated just fine. Extra caution should be exercised on checking the name of the surface to be used in a set to swep. And that’s all.

valu bnw 20
valu hght 150
valu resultw - hght bnw

seto wall
pnt p2 84 4 0
pnt p3 84 4 1000

line l1 p2 p3
seta se1 l l1

swep se1 sesw1 tra 4 0 0

seta sesw2 A001
swep sesw2 sesw3 tra 0 bnw 0
swep sesw3 sesw4 tra 0 resultw 0

setc wall

plot se wall