The purpose of of this program is to compare Bills of Materials (BOMs) derived from a CAD program (like SolidWorks) and compare them to BOMs stored in an ERP database program (like that of SyteLine). The CAD and ERP programs must be able to export to excel files because that is where this program gathers BOMs from for comparison.
The file names for BOMs that come from the CAD program should be the part no. of the BOM followed by _sw.xlsx. That is names like 0300-2010-005_sw.xlsx, 093352_sw.xlsx, and 35K2445_sw.xlsx are all legitimate file names. The names of the files from the ERP database will end with _sl.xlsx. Thus the names will look like 0300-2010-005_sl.xlsx, 093352_sl.xlsx, and 35K2445_sl.xlsx. The program will match the 0300-2010-005_sw.xlsx file to the 0300-2010-005_sl.xlsx file, and so forth.
A file can contain a mulilevel BOM. For a BOM from the ERP program to be recognized as a multilevel BOM, a column named "Level" must exist (can be altered with bomcheck.cfg) that gives the relative level of a subassembly to the main assembly. The Level column starts out with "0" for the top level assembly, "1" for part/subassemblies under the main assembly, "2" for a part/subassembly under a Level "1" subassembly, and so forth. From the CAD program, it is similar, but item nos. indicate the Level, e.g. item nos. like 1, 2, 3, 3.1, 3.2, 3.2.1, 3.2.2, 3.3, 4, etc., where item 3 is a subassembly with parts under it.
Column headers of BOMs (e.g. ITEM, QTY, DESCRIPTION, etc.) may vary from company to company. There is a file that you can configure that may be of help. See the file named bomcheck.cfg.
To run the program from the command line, run like this:
bomcheck
import bomcheck as bc
bc.bomcheck(arg1, arg2, ..., argN)
To see what arguments (arg1, arg2, ...) that bomcheck takes, in Jupyter Notebook, on the line showing "bc.bomcheck()", hit Shift-Tab. (The cell must have been ran first). Either that or create a new cell and run:
help(bc.bomcheck)
If an error occurs when checking your BOMs, or if bomcheck is confused about some data that was entered, a message will be shown that describes the problem. Otherwise look for something you may have done wrong like failing to attach the _sl or _sw characters to the file name.
Tip: If the SyteLine BOM is a multilevel BOM (has a column named "Level"), then the name of the Excel file for that BOM is irrelevant as long as it has the _sl characters attached. In this case part numbers of multilevel SyteLine BOMs are extracted from the BOM itself and not from the file name. So then a file name like 094433_initial_sl.xlsx will work, or even a name like mybom_sl.xlsx will work.
Shown below is an example of a few lines of what a bom check looks like:
assy | Item | i | q | d | u | Q_sw | Q_sl | Description_sw | Description_sl | U_sw | U_sl |
---|---|---|---|---|---|---|---|---|---|---|---|
730322 | 130031 | X | X | X | X | 1 | HOUSING | EA | |||
130039 | X | X | X | X | 1 | HOUSING | EA | ||||
220978 | - | - | - | - | 1 | 1 | SPUR GEAR | SPUR GEAR | EA | EA | |
275000 | - | - | - | - | 0.35 | 0.35 | TUBE | TUBE | FT | FT | |
380000 | - | - | - | - | 2 | 2 | BEARING | BEARING | EA | EA | |
441530 | - | - | - | - | 1 | 1 | SHIFT ASSY | SHIFT ASSY | EA | EA | |
799944 | - | - | X | - | 1 | 1 | SHAFT | AXLE | EA | EA | |
877325 | - | X | X | - | 3 | 1 | PLUG | SQ. HEAD PLUG | EA | EA | |
900000 | - | - | - | - | 0.75 | 0.75 | OIL | OIL | GAL | GAL | |
441530 | 433255 | - | - | - | - | 1 | 1 | ROD | ROD | EA | EA |
500000 | - | - | - | - | 1 | 1 | SHIFT FORK | SHIFT FORK | EA | EA | |
K34452 | - | - | - | - | 1 | 1 | SPRING PIN | SPRING PIN | EA | EA |
The columns i, q, d, and u show Xs if Item, Quantity, Description, or Unit of measure don't match between the SolidWorks BOM and the ERP BOM. Q_sw and Q_sl are quanties in SolidWorks and the ERP. Desription_sw and Description_sl are a comparison of descriptions. U_sw and U_sl are a comparison of units of measure. The 1309031 part is in the ERP but not in SolidWorks, thus the blank space in columns for the SolidWorks category. Likewise, 130039 is in SolidWorks, but not in the ERP BOM
If a unit of measure (U/M) is not given for a value in the Length column of a SolidWorks' BOM, then the U/M is assumed to be Inches (unless changed in the bomcheck.cfg file). However the U/M can be explicity specified, e.g. 336.7mm. The program will recognize the following abreviations for U/Ms:
in, inch, ”, ft, ', feet, foot, yrd, yd, yard, mm, millimeter, cm, centimeter, m, meter, mtr, sqin, sqi, sqft, sqf, sqyd, sqy, sqmm, sqcm, sqm, pint, pt, qt, quart, gal, g, gallon, ltr, l, liter.
When the program is run, values will be converted to the U/M given in the ERP database program. For example, 336.7mm will be converted to 1.10 ft, and 8 pints will be converted to 1.00 gal. Other names that can be substituted for the column name LENGTH in a SolidWorks BOM are: SIZE, Length, L, SIZE, AMT, AMOUNT, and MEAS. Names are case sensitive.
There is a file name bomcheck.cfg that contains settings that you can change in order to alter how the bomcheck program behaves. For example, you can change units of measure. Open bomcheck.cfg with a text editor program such as Microsoft's Wordpad. There you will see settings that can be changed. Place bomcheck.cfg in a directory of your choosing. Then set the location of this file via an argument setting in the bomcheck function, or, if you are using bomcheckgui, go to the settings section and enter the location there.