KiCad BOM Wizard Plugin with customisable output (Can make HTML and CSV BOM)

Hiya @immersitech @Anders_Wallin sorry for the delay reply

Which version of node and npm are you both running? I remember there been an issue a while back with using const {}

Here’s the command to get the version numbers.

node -v && npm -v

I’m curren’tly running v7.9.0 for node and 4.2.0 npm

Hi @KevMonster sorry for the very late reply. If it wasn’t for @immersitech tweet earlier I think it might have been another few more month before I realised I had any pending message on ere :disappointed:

Sorry.

With regard to getting the datasheet field on the BOM. The pluging wasn’t pulling that information. To be honest there are a few other field that I’m not pulling. For example library source and component sheet location.

That said, I’ve updated the plugin and pushed it back to the repository. So if you don’t mind cloning/pulling the update then you should be able to get the datasheet info.

Ron

1 Like

Here’s what I’m running on my system:

$ node -v && npm -v

v4.2.6
3.5.2

I installed these from the Ubuntu 16.04 repositories, so maybe that’s why my versions are earlier than what you have?

Ahh that’s quite old. You will need to install the updated version. Here’s the instruction from node.

You will need to first purge the current version node via sudo apt-get purge node

Ron

That fixed it! The BOM runs just fine now.

~$ node -v && npm -v
v8.4.0
5.3.0

Thank you for the help, Ron!

Bob

For those wanting to use the PDF export function, you no longer need to use the development branch. The code is now live on the master banch and ready to use.

Ron

3 Likes

Yes needs a new layout, will be trying this

First of all thanks for making this plugin available.
Is it possible to have a column separator different from comma?
In Italy we use a comma as decimal separator, as an example 10200 can be written as 10,2 k. At present if I write 10,2 the number will be incorrect in BOM: 10 will be in a column and 2 in the following column.

Not sure about this tool but is possible with KiBoM

A better more robust way to write the value 10.2k would be to write 10k2. (Keep this in mind if you ever want to share your designs worldwide.)

Tried but I get an error message

 Command error. Return code 1 

Thanks.
I know that 10k2 is internationally recognized. But avoiding comma as separator should be useful also because we use comma sometime in title block.

Strange. What command string are you using to call the script?

python “/home/giorgio/Documenti/KiCad_prove/KiBoM-master/KiBOM_CLI.py” “%I” “%O”

Hi Giorgio,

KiCad bom wizard should be able to output the format that you want. If you are happy to create your own template.

For example, by default it will use the internal CSV template located here. If you make a copy of that somewhere in your computer and update it so that the commas are replace with a safe delimiter then that should do it.

After that you just need to pass that template to the plugin like so:

kicad_bom_wizard "%I" "%O.csv" "/PATH_TO_MY_TEMPLATE/CSV"

:neutral_face: That said, I wonder if I should update the original CSV template so that it encloses all the values inside quotes by default. That should fix your issue and make it more robust.

  • Ron
3 Likes

Sorry to ask what’s probably a silly question. I got node installed on my Win7 x64 system and, thanks to the comments above, fixed my directory problems.

When I run the command line now, I get:

Success

Info messages:
depdencies are missing. Please wait while they are installed.

Nothing gets installed and a CSV file isn’t generated. Any ideas?

I’m trying to get this running on Windows 10. I’m getting error 5:access denied.

The command I’m running is “C:\Program Files\nodejs” “C:\KiCAD\KiCad_BOM_Wizard\KiCad_BOM_Wizard.js” “%I” “%O.csv” “CSV”

I have not installed the BOM wizard globally, not sure how to do that on Windows.

Any help is much appreciated!

You are going to have to change the file permissions or move it to your personal directory space. I don’t know Windows that well but I’m sure there is some pop up box that will let you do this.

Same thing Linux Mint 18.1

Command error. Return code 1

Error messages:
/home/mike/Documents/GitHub/KiCad_BOM_Wizard/KiCad_BOM_Wizard.js:51
const { exec } = require(‘child_process’)
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions…js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

On ubuntu 16.04LTS I am using these custom installed versions and it works OK:
$node -v && npm -v
v6.12.2
3.10.10

The thing that creates confusion here is that the error message has nothing to do with node version. The script should ideally check for what it needs at the start and give a clearer & understandable error message.

1 Like