bomcheck help

* go to 'how to install bomcheckgui' web page *

Introduction

The purpose of of the bomcheck program is to compare BOMs (Bills of Materials) derived from a CAD program (like SolidWorks) and compare them to BOMs from an ERP database program (like that of SyteLine).  The CAD and ERP programs must be able to export to Excel files.  BOMs are gathered for comparison from these Excel files.  Bomcheck is run from a command line interface (CLI).  Bomcheck has a companion program called bomcheckgui that allows bomcheck to be run via a graphical user interface (GUI).

Installing/Upgrading and virtual environments

A program called getbc.py (i.e. get bomcheck) is available that you can use to get and install or upgrade bomcheck and bomcheckgui.  For more information about how to obtain and use this program, see getbc_help.

How to run bomcheck via a CLI

Using Windows File Explorer, go the folder where the BOMs reside that you wish to evaluate.  Type cmd in the address bar of File Explorer to open a Command Window (CMD).  While in that folder activate bomcheck's virtual environment.  (Do py getbc.py --copy to determine the command to activate your virtual environment.  Copy that command to an easily accessible text file for future reference.  Copy that command into the cmd window to activate the virtual environment.  See getbc_help for more information about virtual environments)

Enter a command like this to run bomcheck from the command line:

The "*" means: gather all files from current directory for evaluation.  The --drop "['3*-025', '3081-*']" means: from SW BOMs, don't evaulate part numbers 3*-025 and 3081-*.   --drop is a switch.  To see a list of all of bomcheck's switches, enter bomcheck --help

If you'd rather have a graphical user interface (GUI), use bomcheckgui instead.

Basics you need to know

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.  Similarly the names of the files from the ERP database should 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 BOM from an ERP database can be a mulilevel BOM. For the BOM to be recognized as a multilevel BOM, a column named "Level" must exist. The Level column gives the relative level of subassemblies within a main assembly. The Level column starts out with "0" for the top level assembly, "1" for parts/subassemblies under the main assembly, "2" for a parts/subassembly under a Level "1" subassembly, and so forth.

A BOM from a CAD program can also be multilevel. For a CAD BOM to be recognized as multilevel BOM, it must have a column named "ITEM NO.". The numbers in that column should look something like this: 1, 2, 3, 3.1, 3.2, 3.2.1, 3.2.2, 3.3, 4, etc..

Tip #1: If two or more underscore characters exist within a file name, like 094433_testBOM_sw.xlsx, the characters between the first and last underscore characters will be ignored. In this case testBOM.

Tip #2: If the ERP BOM is a multilevel BOM (i.e. has a column named "Level"), then any characters proceeding the "_sl.xlsx" characters will be ignored. Instead the part number is obtained from within the Excel file where the part no. for Level 0 is shown.

Interpreting results

Shown here is an example showing what a few lines of bomcheck's results look like:

assy Item IQDU Q_sw Q_sl Description_sw Description_sl U_sw U_sl
730322 130031 XXXX 1 HOUSING EA
130039 XXXX 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 ‒XX‒ 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 CAD and ERP. Desription_sw and Description_sl are descriptions in CAD and ERP. U_sw and U_sl are U/Ms (units of measure) in CAD and ERP. Shown above, the 1309031 part is in the ERP but not in CAD. Thus the blank space in CAD's pn column. Likewise, 130039 is in CAD but not in ERP

Units of Measure

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, and only these:

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.

Units of measure are not case sensitive. So, for example, you can use sqin or SQIN. Also, sq in is not the same as sqin, so sq in will not be recognized.

When the program is run, values will be converted to the U/M shown 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. (Column names are case sensitive.)

Viewing txt file results with Excel

To view a text file in Excel, copy and paste the text from notepad, or a similar text editor, into a blank sheet in Excel. To make column widths fit the text, click the small box located at the left of column header A, then double click on the vertical separator line that is between columns A and B. All column widths will then be adjusted.

make column width fit text

For more information see: Import or export text (.txt or .csv) files - Microsoft Support

(FYI: bomcheck text files are Tab delimited)

drop list & exceptions list

Perhaps you have parts that show in the CAD BOM, and they are not to be shown in the ERP BOM. For example hardware bolts and nuts that are common stock items. These will show up as errors when bomcheck is run. However you can exclude these CAD items from the check. To do this enter these items in what is called a drop list. The list will look something like this:

['3*-025', '3182-*']

Add as many items to the list as you like. If there are exceptions to this that you would like to account for, then create an exceptions list. Here is an example of an exceptions list:

['3042-*-025', '3182-0000-001']

The drop and exceptions lists can be activated in three different ways:

  1. Enter your drop and exceptions lists in a bomcheck.cfg file. Then when you run bomcheck from the command line invoke the -d switch. (Tip: run bomcheck --help on the command line to see a list of options.)
  2. When running bomcheck from the command line, enter your drop and excecptions list directly as an option on the command line. E.g. bomcheck --drop ["3*-025"] --exceptions ["3042-*-025"] filename. (The -d switch will automatically be invoked; --drop arguments will supersede values values from a bomcheck.cfg file.)
  3. When running bomcheck via the bomcheckgui program (bomcheckgui is a wrapper for the bomcheck program) go to bomcheckgui's settings and enter your drop and exceptions lists there. Click the "Activate drop list" check box to activate these lists when bomcheck is run. (When running this way the drop and exceptions lists in settings supersede those lists in the bomcheck.cfg file.)

bomcheck.cfg

Download the file named bomcheck.cfg (download link) that contains settings that you can change in order to alter how the bomcheck program behaves. For example, you can change units of measure, change what column headings that bomcheck recognizes, redirect html links that are used by bomcheckgui's help menu, etc..

Open bomcheck.cfg with a text editor program such as Microsoft's Wordpad.exe. (Warning: different text editors can sometimes place different end-of-line characters in the text, so be carefull of this.) There you will get an explanation how to change different settings.

Place bomcheck.cfg in a directory of your choosing. Then set the location of this file via an argument setting in the bomcheck function (do bomcheck --help to see command line options), or if you are using bomcheckgui, go to the bomcheckgui's settings section and enter the location there.