I'm not sure what you have tried to do already ... but have you tried to use the "set(attr, attrValue)" function?Something like this:
@Hidden
attr originalArea = 0
Lot -->
print("Original Area", geometry.area)
set(originalArea, geometry.area)
BuildShape
BuildShape -->
shapeL(3, 4){shape: ShapeRule | remainder: NIL}
ShapeRule -->
alignScopeToAxes(y)
print("Original Area Again", originalArea)
print("Current Shape area", geometry.area)
extrude(world.y, originalArea/8) # calculate height in function of oriignal footprint area
Shape.
Does it work?