|
Create Recipes for Windows |
Top Previous Next |
|
Creating Recipes for windows (the glass type, not software) is a useful exercise to see demonstrate how basic recipes can be extended.
Typically, a recipe for windows needs to
This is a simple exercise if all windows are the same size and all walls are the same construction. However, this is not the case. The simplest solution is to duplicate all likely size and construction type, but this can lead to a large number of recipes (in the hundreds and even thousands).
A more elegant way is to use some of the features of databuild Recipes:
Using Recipe Formulae In the following example showing ingredients and their recipe formulae, observe the following:
1 Height and Width are local variables that were specified in the workup text of the main item. 2 Local Variable WAREA is created and set to Height x Width 3 Local Variable TAREA is created and set to WAREA X Quantity of the main item (No windows) 4 Local Variable NBRICKS is created and set to WAREA X 51 and rounded to next whole number (Number of bricks) 5 The remaining ingredients use the local variables to calculate their quantities and populate the workup text 6 The use of Quantity = to over-ride quantities where workup text is not used 7 The use of the hash symbol # to prevent formula going to workup text 8 The use of the OnlyIf statement to select recipes based on local (or Job) variables
000WW Alum Window 2.4 PINE F5 FRAME / PLASTER BRICK VENEER WALL 1 Height=1200 Width=1500
is made up of the following: 1101 90 x 35 Pine 2 LocalVariable WAREA = [HEIGHT*WIDTH/1000000] # 3 LocalVariable TAREA = [qty*WAREA] # 4 LocalVariable NBRICKS = [TAREA*51rnd1] # [qty*2]/[WIDTH/1000rnd0.3] 1101S 90 x 35 Pine F5 Studlengths STUDS#[qty*-2]/2.4 1102S 90 x 45 Pine F5 Studs JAMB STUD#[qty*2]/2.4 1109N 70 x 35 Pine F4 Merch 5 Noggs#[-qty*WIDTH/1000] Lin m 1418 42 x 14 M.D.F Single Bevel [qty*2]/[WIDTH/1000rnd0.3] ; [qty*2]/[HEIGHT/1000rnd0.3] 3020 Brick Sand 6,7 Quantity = [-NBRICKS/1000] # 3025 Cement Quantity = [-NBRICKS/250] # 3026 Limil Quantity = [-NBRICKS/1000] # 3100 Selected Bricks Quantity = [-TAREA] # 3300 Brickwork Labour Quantity = [-NBRICKS] # 3332 Cut and Place Brick on Edge Sills [qty*WIDTH/1000] Lin m 4710 10mm Plaster - Walls Quantity = [-TAREA] # 5670 R1.5 Insulation Batts. Quantity = [-TAREA] # 6700 Face Brickwork Clean Quantity = [-NBRICKS] # 7340 Fly-screens To suit window [Height] X [Width] AW0606 Aluminium Window 600x600 8 onlyif [Height<650 & Width<650] # Actual Window [Height] x [Width] AW0909 Aluminium Window 900x900 onlyif [Height>=650 & Height<950 & Width>=650 & Width<950] # AW0912 Aluminium Window 900x1200 onlyif [Height>=650 & Height<950 & Width>=950 & Width<1250] # AW0915 Aluminium Window 900x1500 onlyif [Height>=650 & Height<950 & Width>=1250 & Width<1550] # AW0918 Aluminium Window 900x1800 onlyif [Height>=650 & Height<950 & Width>=650 & Width>=1550] # AW1212 Aluminium Window 1200x1200 onlyif [Height>=950 & Height<1250 & Width>=650 & Width<1250] # AW1215 Aluminium Window 1200x1500 onlyif [Height>=950 & Height<1250 & Width>=1250 & Width<1550] # Actual Window [Height] x [Width] AW1524 Aluminium Window 1500x2400 onlyif [Height>=1250 & Height<1550 & Width>=1850 & Width<2450] #
. . . . AWSpecial Aluminium Window Special onlyif [Height>=1550 | Width>2450] #
In the example above we have assumed a constant wall type. We could have gone further and made wall type dependent on a local or job variable, or used sub recipes to hold wall type deductions
On a typical job, there are a variety of window sizes. If you are to use recipe formulae to detail windows, you must have a different item for each different window size or type.
An easier way is to use a pre-load item setup to accept schedule input This item must have units with calculation routine of AREA. Use the workup routine to enter or select window sizes. When complete, run the Split Item function to create a new item for each line of the area workup. Any Local Variables in the workup area of the pre-load item transfer through to the target item
Example
000XX Window Pre-Load Item Loading = Tiles Height Width Quantity 1200 x 1500 1 OFF 1500 x 1800 2 OFF 900 x 900 3 OFF
Split to Item 000WW, deletes the above item and creates a new item for each valid line
000WW Alum Window 2.4 PINE F5 1 OFF Loading = Tiles Height=1200 Width=1500
000WW Alum Window 2.4 PINE F5 2 OFF Loading = Tiles Height=1500 Width=1800
000WW Alum Window 2.4 PINE F5 3 OFF Loading = Tiles Height=900 Width=900
The processed line is then added to the workup text. Anything before # is ignored, and may be used for comments If the calculation routine of the units of the ingredient is lineal, area, volumes, hours or weight, the quantities are recalculated and over-rides the default Quantity*Main Item Quantity .
Local Variables act within Formulae exactly as Job variables, but they are limited in scope to the current main item. They come from 2 sources:
1. From the main item's workup text
On a line by line basis, the system scans the workup text on the main item (the one being exploded) if it finds a name (no spaces), then an equals sign ("="), then a number, it creates a local variable using that name and number e.g width = 1800
2. From lines in recipe formulae. if a line in the recipe formula starts with "local variable", followed by a name, an equals sign ("="), , then a number, it creates a local variable using that name and number e.g. LocalVariable Area = 2.4
Example 1
If the main item had a quantity of 3 and its workup text contains Enter height and Width Height = 1200 Width = 1800
and the formula was LocalVariable Area = [Height * Width/1000000]# onlyIf [Area>=1 & Area<3]# Please supply Some Comments#[Height-50] X [Width-75] [qty] OFF then the ingredient workup text becomes. Had Height x Width been outside limits( 1 to 3 m2) then ingredient would have been ignored Please supply 1150 X 1725 3 OFF
Example 2 You have a catalogue item reserved for overall job Data, this item has a template which contains [QG] 0 >> GroundFloorArea 0 >> GarageFloorArea
This item is loaded into an empty job (or is part of a standard bill copied in), usually as the first item in the first cost centre. This populates the Quantity Generator field with
0 >> GroundFloorArea 0 >> GarageFloorArea
which you then alter to the relevant values:
100 >> GroundFloorArea 20 >> GarageFloorArea
Running Generate Quantities creates the job variables and sets their values. Alternatively, the system will stop and request values whenever it comes across new variables for any job
These variables can then be used in any recipe formula
e.g. Recipe R999 Ground Floor Particleboard, F17 Bearers, F17 Floor Joist, Concrete Stumps contains 0100 Particleboard Flooring formula: Quantity = [GroundFloorArea / 2.88] 0789 F17 Bearers Formula: Quantity= [GroundFloorArea / .909] 3456 F17 Floor Joists Formula Quantity= [GroundFloorArea / .543]
Recipe R998 Roof Framing Timber trusses, plaster ceiling, insulated contains 9087 Timber truss Rate per Sqm Formula: Quantity = [GroundFloorArea *80] 5678 Plaster Ceiling 10mm Formula: Quantity = [Ground Floor Area] 3421 R2.5 Ceiling Batts Formula: Quantity = [Ground Floor Area] 4545 Labour for Truss roofing Formula: Quantity = [Ground Floor Area *44]
Refer to |