From SPLASH

V12
Creating Custom Softlist Formulas
By Brian Beyst
Jun 26, 2003

Out of the box SoftPlan's material list generator, SoftList, is adequate for generating approximate building materials costs. But to generate very accurate material lists and building cost estimates specific to your geographic area and business needs, you need to be able to modify how SoftList generates its reports and calculates quantities. Modifying SoftList formulas is not as difficult as you might think... Begin as you did with design--start simple and slowly increase the complexity of your work. In the example that follows I show how to write a custom formula for calculating wall plates in 16' 12' 10' and 8' stick lengths. When you are ready to begin your SoftList modifications, I suggest you begin in SoftPlan and make a very simple one floor box structure with a gable roof, something that you can easily calculate the materials for using pen and paper, and name it MATERIALS TEST. Use this simple structure as a starting point to verify that your modifications are working and producing what you require. With this file drawn, saved, and on the floor stack, open the Softlist setup screen. To do so start at the SoftPlan menu bar and select BUILD > MATERIAL LIST > SETUP The SoftList Setup utility will appear (a mostly blank screen with a short menu bar at the top). Select FILE > COPY > MATERIAL DEFINITION > STANDARD DETAILED. Name the copied files something telling, like "Trials." Now select MATERIAL DEFINITION > "TRIALS" > EDIT MATERIAL.... In the dialog box that appears scroll down until you find WALL PLATE, highlight it and click the "edit" button. A new dialogue box appears. Click on "Custom Formula" under calculation method. Highlight everything in the formula box and delete it. You are ready to begin writing your custom formula....


I use a "brute-strength" approach to calculate quantities of orderable sizes of many materials. Although this article will focus on wall plates, the same methodology can be applied to any material with which you have the freedom to purchase a wide variety of sizes. (I use this method, for example, to calculate quantities of header material, but not rafters in as much as a single rafter cannot be pieced together with multiple short pieces.) The basic idea is to order the greatest number of the longest pieces, and the least number of the shortest pieces.


The custom formula below uses the BEFORE:, DURING:, AFTER: command. BEFORE I add up all the wall plate lengths for a given wall width (2x4 or 2x6) I must set my variables to zero. (The "@" as the first character in a variable name designates a "local" variable--one that is only recognized by the formula using it) before: @sixteen = 0 @twelve = 0 @ten = 0 @eight = 0 @left = 0 @width = 0 @width_other = 0


The PROCESS portion of the formula is where I add individual lengths of wall plate to a running total--one for 4" walls and one for 6" walls. process: if between(thickness, 5", 6") Plate_Length_S = Plate_Length_S + length endif if between(thickness, 3", 4") Plate_Length_F = Plate_Length_F + length endif if not between(thickness, 3", 4") and not between(thickness, 5", 6") Plate_Length_O = Plate_Length_O + length @width_other = roundup(thickness,2") endif


AFTER all the plate lengths have been added the real work begins.... My local variable "@sixteen" will store the number of 16' sticks I'll be ordering, "@twelve" will store the number of 12' sticks, and so on. The number of 16' sticks is determined by dividing the total length of wall plate by 16 and keeping only the integer (I won't be ordering 12 and 7/32 pieces of 16' stick...). Taking the number of 16' sticks X the length of a 16' stick tells me how much of my total wall plate need has been met thus far. IF my remaining wall plate need is best met by ordering just one more 16' stick--that is to say, my remainder is more than 14' and less than 16', I add one more stick and I'm done counting.


after: @sixteen = trunc(Plate_Length_S/16) @left = roundup(Plate_Length_S - @sixteen*16,1') if between(@left,14',16') @sixteen = @sixteen + 1 @left = @left - 16 endif IF, however, my remaining wall plate need is less than 14' I need to determine how many 12' sticks to order. The variable "@left" keeps track of how much wall plate is still unaccounted for. As for the 16' stick count, I divide the amount of unaccounted wall plate by the length of stick that I'm considering (at this point 12') and keep only the integer value. The amount of unaccounted wall plate (@left) is then reduced accordingly. Again, if purchasing just one mor stick will account for all the plate need, increase the stick count and be finished.


if remainder(@left,10)>0 @twelve = trunc(@left/12) @left = @left - @twelve*12 if between(@left,10',12') @twelve= @twelve+ 1 @left = @left - 12 endif endif


The same proceedure is carried out for 10' and 8' stick lengths. if remainder(@left,8)>0 @ten = trunc(@left/10) @left = @left - @ten*10 if between(@left,8',10') @ten= @ten+ 1 @left = @left - 10 endif endif @eight = trunc(@left/8) @left = @left - @eight*8 if @left >0 @eight = @eight + 1 endif


We're now ready to send our various stick counts for 2x6 walls to the materials report by utalizing the LUMBER command. @width = 6" if @sixteen>0 lumber ( @sixteen, 2", @width, 16', spruce) endif if @twelve>0 lumber ( @twelve, 2", @width, 12', spruce) endif if @ten>0 lumber ( @ten,2", @width, 10', spruce) endif if @eight > 0 lumber ( @eight, 2", @width, 8', spruce) endif


Below the same counting and reporting process will be carried out for 2x4 walls. @sixteen = 0 @twelve = 0 @ten = 0 @eight = 0 @left = 0 @sixteen = trunc(Plate_Length_F/16) @left = roundup(Plate_Length_F - @sixteen*16,1') if between(@left,14',16') @sixteen = @sixteen + 1 @left = @left - 16 endif if remainder(@left,10)>0 @twelve = trunc(@left/12) @left = @left - @twelve*12 if between(@left,10',12') @twelve= @twelve+ 1 @left = @left - 12 endif endif if remainder(@left,8)>0 @ten = trunc(@left/10) @left = @left - @ten*10 if between(@left, 8',10') @ten= @ten+ 1 @left = @left - 10 endif endif @eight = trunc(@left/8) @left = @left - @eight*8 if @left >0 @eight = @eight + 1 endif @width = 4" if @sixteen>0 lumber ( @sixteen, 2", @width, 16', spruce) endif if @twelve>0 lumber ( @twelve, 2", @width, 12', spruce) endif if @ten>0 lumber ( @ten,2", @width, 10', spruce) endif if @eight > 0 lumber ( @eight, 2", @width, 8', spruce) endif


Finally, to account for odd size plates, I simply send the wall plate total length to the materials report.... if Plate_Length_O > 0 lumber(Plate_Length_O, 2", @width_other, 16', spruce, lineal) endif

© Copyright 2004 by SPLASH  http://www.softplansplash.org