|
Formulae |
Top Previous Next |
|
Various parts of Databuild make use of formulae to calculate values
Basic Syntax follows normal mathematical rules:
( ) subexpressions ^ power *, / multiplication, division % modulus (remainder) \ integer divide +, - addition, subtraction >, >=, logical comparison <, <=,<> &, | logical "and", logical "or"
In addition to the standard operators, the following built-in functions are supported (they are not case sensitive): Abs, Sin, Cos, Tan, ACos, ASin, Atn, Log, Log10, Exp, Sqr, Int, Frac, Ceil, and Floor. All angles are in degrees
example 2+2 (6x2) + (12/3)
Extensions You can use Number variables. If used in a formula, the number value for the current job is read and substituted. If it does not yet exist, the system prompts you for a value
example FLOORAREA * 1.15. Avoid using formulae which could possibly yield division by zero (15/FLOORAREA)
Qty is a special variable which equals the current item quantity
RNDX: Rounds a Quantity to X RND10 rounds to the next 10; RND.01 rounds to 2 decimal places
The following "burnt in" variables: RUN calculated run for rafters etc RISE calculated rise for roofs etc BH brick height =86 BL brick length =210 BLL block length =410 PI =22/7
Logical expressions equate to 0 for False and -1 for true
for example 1500 - (BEAMWIDTH>1000)*500 equates to 1500 if the variable BEAMWIDTH is up to 1000 or 2000 if it is over 1000 All components of a formula must be numeric, otherwise they are treated as variables. Hence Cladding <> Bricks would be invalid unless both Cladding and Bricks were numerical variables |