Importing a CSV Bill of Materials from drawings on disk.

<< Click to Display Table of Contents >>

Navigation:  Tutorials > Editing Tutorials > Exporting and Importing a Bill of Materials from PrimeCut database >

Importing a CSV Bill of Materials from drawings on disk.

This type of BOM is different from the other type, in that this type is for importing parts from their drawings, not from the database. If you have the parts in the database, there will be a part name conflict if you use this type of BOM. This is for first time import only.

The most popular way for using this type of Bill of Materials, is to use a spreadsheet program (e.g. Microsoft Excel, or Apache OpenOffice Calc (open source)) to provide a table for customers to fill out the categories, and then saving it as a .CSV file when you receive it.

See also Loading Parts via Bill Of Materials - Generic BOM

1Open the Workorders module.

2Click the New Workorder button new.

3Click Import Part 2838.

4In the file type field select Comma Separated Values (*.csv) for a CSV file.
This file must contain the following columns, other columns are optional.  If thicknesses contain a unit specifier (eg " or mm) then units will be used otherwise mm is assumed.
PartName, Qty, Grade, Thickness
 
 

3720

5Select the BasicWorkflowBOMCSV.csv file in NE Tutorial Parts and click Open. The following window should appear:  

3516

As you can see it has already chosen the parts, their material, thickness and quantity for an exact copy of the workorder we had in the first tutorial.

6Click OK. Notice that the parts were loaded without error.  

The file above csv file looks like this when viewed in Notepad (or any text editor):

PartName,Grade,Thickness,Qty

326-155 FORM.dxf,Mild Steel,10,2

brace plate-2.dwg,Mild Steel,10,5

flange-1.dwg,Mild Steel,10,1

brace plate-1.dwg,Mild Steel,10,4

When viewed in a spreadsheet program like Microsoft Excel the file looks like:

3721

This is especially convenient because most customers will have a spreadsheet program, and can modify an example table you send them to contain their workorder. This would remove a source of error in customer service, and speed up the workorder and quote setup time.
 
Spreadsheet Programs can save CSV files as an option under Save As, in the case of Excel, choose CSV (Comma Delimited).  

When loaded, the csv file must be in the same directory as the part files for loading. Any of the part files you can import normally should be able to be imported using a csv file. Note that spreadsheet programs can load and save csv files too.

CSV files can be used to import rectangular dimensions of cutouts too. The following example shows how cutouts can be imported as well as what happens when a csv file doesn't correspond with reality.

In Notepad, this next csv file 'CSVwithCutouts.csv' looks like this.

PartName,Grade,Thickness,Qty,Width,Height

326-155 FORM.dxf,Mild Steel,10,2,0,0

Cutout- 200x400,Mild Steel,10,5,200,400

brace plate 1.dwg,Mild Steel,10,6,0,0

Cutout- 100x300,Kryptonite,10,7,100,300

When viewed in a spreadsheet program like Excel, the BoM looks like this:

3722

 

Note the following that is correct:

The columns of Width and Height have been added for the Cutouts.

The cutouts are not files, and so have no extension (.dxf or .dwg)

Normal parts have been given a Width and Height of 0.

Note the following that is incorrect:

There is a 'brace plate-1.dwg' part but there isn't a 'brace plate 1.dwg' part (the hyphen is missing).

The material for that last cutout 'Kryptonite' isn't in our database.

7Click Import Part again, and this time select the CSVwithCutouts.csv file, and click Open.  The following window should appear:

3517

The first two entries are importing fine, but the 3rd entry has a red circle to show that the file could not be imported, while the 4th entry has a yellow circle to show the properties of the part don't match any available material/thickness.

8Click Cancel (Clicking OK would just import the parts with no errors)

9Close the module without saving.