Cabinet Components door/door price equation


CedarCreek
 Share

Recommended Posts

  • CedarCreek changed the title to Cabinet Components door/door price equation
1 hour ago, CedarCreek said:

We're looking for the Cabinet door component attributes.

thats a bit more difficult. Panels are a collection. You'd have to know which panel you are referencing, say panel 0 for instance, then panels[0].formatted_size reports a string value of both width by height such as "23 7/8"x24 5/16"" for which you would need to split or index and convert to create your calcs.
I have a system that prices out cabinets on the fly very accurately but its expensive...takes number of plywood sheets into account, panel sq ft, finish options, variables and a bunch more...can get pretty complex.
You could write this macro and input it into your count. It totals all panels but has no conditional statements for false panels or slab vs shaker etc.

# Copyright Rabbitt Design 2023

# INITIALIZE TOTAL SQUARE FOOTAGE VARIABLE
total_sq_ft = 0.0

panels.each do |panel|
  # EXTRACT WIDTH AND HEIGHT FROM FORMATTED SIZE
  w, h = panel.formatted_size.split("x").map { |dim| dim.to_i }

  # CONVERT DIMENSIONS TO SQUARE FEET AND CALCULATE SQUARE FOOTAGE FOR EACH PANEL
  sq_ft = (w * h) / 144.0

  # ACCUMULATE TOTAL SQUARE FOOTAGE
  total_sq_ft += sq_ft
end

# REPORT TOTAL SQUARE FOOTAGE
total_sq_ft
 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share