This is a collection of formulas that cover common calculations you may want to include in your bill of materials. To use these in your BOM, you may need to change the parameter or property names to match your configuration. To read more about formulas in Bommer, please see the Formulas and calculated fields guide.
Computing line-item cost, formatted to 2 decimal points
= Quantity * Unit Cost | 0.2
This formula multiplies the line item quantity by a Unit Cost property and formats the results to 2 decimal points. When combined with a flat or parts-only BOM export, this can be very useful to understand the total cost of a specific component within an assembly.
Computing line-item cost of packaged goods, formatted to 2 decimal points
= Quantity / Package Quantity | ceil * Package Cost | 0.2
This formula multiplies the line item quantity by a Unit Cost property and formats the results to 2 decimal points. When combined with a flat or parts-only BOM export, this can be very useful to understand the total cost of a specific component within an assembly. This formula is a great example of how formulas are evaluated: Quantity is divided by Package Quantity, then rounded up using ceil, then multipled again and formatted to two decimal points.
Switching a line item cost based on the value of the Make/Buy property
= if ("Make/Buy" == "Make") then Make_Cost else if ("Make/Buy" == "Buy") then Buy_Cost else 0
This formula assumes that your document has conditionals enabled (see here for more info) and the there are two additional properties, Make_Cost and Buy_Cost that contain formulas to compute the cost of a part if it is a custom part or a purchased part. Using this information, this formula will elect either the Make_Cost, the Buy_Cost, or 0 depending on if Make/Buy is Make, Buy, or empty/not specified. This formula (and many like it that use conditional statements) are especially powerful when set as default formulas for a property; this lets Bommer calculate this formula for all line items automatically.
Convert a dimension (Width) to feet/inches (e.g. x’y”)
= (Width ::ft | floor) & \' & (Width ::ft | rem ::in | 0) & \"
This will format a dimension (stored in a parameter or property called Width) as feet and inches, suitable for architectural drawings, documentation, and other places where this is a standard. This formula uses a lot of the Bommer formula features, including unit conversion, formatting, subexpressions, and string concatenation.
Constructing a text code (material code, stock number, SKU, etc) from other properties and parameters
= Face 6 & ~ & Type & ThicknessInt & ~ & Face 5
This formula uses string concatenation to assemble text code from properties and parameters defined for a component. This formula outputs A~B19~C, where Face 6, Type, and Face 6 are properties that are captured in Bommer, and ThicknessInt is a parameter that contains the integer thickness of the part. This type of formula can be used to generate material codes, SKUs, etc directly from parameters and properties that are stored in your BOM, and can include any information that you would include in those codes. Other variations of this may include:
= PartId & “-” & (Width | round | 03) & “-” & (Thickness | round | 03)
Convert a dimension from any length units to ft, formatted to 2 decimal points, with units included in the output
= Longest Dimension ::ft | 0.2 ~
This formula uses the unit conversion operator to force a dimension to be represented in feet, and then formats it to 2 decimal points. This can be useful if you need to represent your dimensions differently in your BOM than in your design, if you model in one set of units but require another set of units in your documentation, or if you have an external system that only accepts dimensions or mass properties (e.g. shipping weight or cut lengths) in specific units.
Comments
0 comments
Please sign in to leave a comment.