Noob Here - Just starting with KiCad - bom problems - possibly due to my ignorance

Hello from a brand new user (5.0.2). I am picking my way through the docs in an attempt to learn Kicad and having never used it before, I am getting some errors that I don’t understand. I did a search but the similar posts on this topic are a bit cryptic to me so sorry for a repeat of what may have already been covered off here.
I’m running on a 64 bit Windows machine and I am trying to run the bom2csv plugin in the BOM option in eeschema. It seems to generate this rather confusing looking .xml file (confusing due to my lack of knowledge about .xml files - lol) but nothing that can be brought straight into Librecalc spreadsheet.

I have a feeling there’s a second step in the generation process that’s not been executed as in the little window there appears this message -

Command error. Return code 11
Error messages:
I/O error : Invalid argument
I/O error : Invalid argument

I have ticked the box that shows “show console window” but when I run the “generate” button I get a rapid flash of some window that teases me with some information that I cannot see what it is. ie there’s not a “console window” appearing on the screen.

If this is detailed somewhere for complete noobs can someone post a link for me, or perhaps attempt to educate me a bit on what’s happening here ?

Thanks Very Much !,
Lewis

I use this one with Linux but the directions in general might be helpful understanding a few things about implementation even if you don’t use it:

1 Like

Thanks Hermit !
That info pulls back the curtain a little bit for me. I recall seeing these user defined fields to symbols as I was reading the docs last night. And I didn’t know about the BOM from the pcbnew. That might be all I need for the moment as I am mainly going to be doing small simple boards for home projects and the local Makerspace crowd. However that openscope project is slick ! Watched the video and going to make a note of that when I get further along with my KiCad education… I’m a noob when it come to git hub as well…there is much to learn…
Cheers,
Lewis

1 Like

Yeah. The learning curve can be daunting in the beginning but it really doesn’t take too much to get to the point where you can make a usable board. The project I linked to has nice instructions and doesn’t take too much to get going. Be aware though, you don’t have to know git/github to use it. They have an option to download the zip.

Quick Edit: The author is a regular on the forum so this is a pretty smoothly integrated and understood program from the forum’s perspective.

1 Like

Thanks again Hermit!

I am picking way way along with the docs and haven’t hit many roadblocks yet. I realized that KiCad is a fast moving target and the docs are not perfectly synced to the software, but it’s close. I’m retired and used to use Eagle a lot for wok but that was about 15 years ago and so there’s no residual knowledge left in my head that is hindering my learning of KiCad - lol.

One more question while I am tapping this out - the github libraries. I downloaded the 5.0.2 and installed, but see that my footprint library table is linked to all the github footprints. I thought I read somewhere that the github libraries are no longer supported and version 5 installs all the libraries locally. So I went on a hunt in windows and found all the .pretty and footprint files on there. But the question remains, why did it set it all up with the github libraries when I did the 5.0.2 install? The only thing I can think is that I had an old version of KiCad installed on my computer from last year (I remember downloading it, but never got to using it). Is it possible that the fp-lib-table was set up in my “home” folder (or the windows equivalent of the Linux home folder), it was detected during the 5.0.2 install, and then left alone? I guess a way to check would be to go find the fp-lib-table and delete it, and then fire up KICad again and see if it copies the default in with the links to the local footprints ?

You’d almost think I knew what was going on by the way I am chattering here - haha.

Anyway, thanks again for your help.
Lewis

That is it exactly. You had installed 4.x which used the github libraries. On Windows the user settings are placed in the C:\Users\<username>\AppData\Roaming\kicad folder. (You will need to turn on show hidden folders in your windows settings if you haven’t already to be able to see and navigate into the AppData folder.) Since you are brand new to KiCad, I’d suggest just nuking the entire kicad folder in the Roaming folder. That should get you back to factory default settings.

You can read more details at this FAQ entry:

Have fun with KiCad!
:smile:

1 Like

Hey - thanks that was fast !

Brilliant! I’m actually understanding at least some about how this all works…appreciate your feedback -
I’ll delete the entire kicad folder in roaming as you have suggested. There is a small test board I am working with so I assume it will forget where the .pro files are for that etc. but I can just navigate and open that project up again and all will be well, yes ? It’s not a complex board - just a few small parts so starting from scratch wouldn’t be the end of the world anyway. I guess some of the parts might be different in the library though…

Cheers from sunny Canada,
Lewis

Just a quick follow up - I deleted the fp-lib-table and sym-lib-table from the home folder, fired up Kicad, got a few messages on “first time…global library …” and it all worked out as expected. Thanks again for the help

Just a small pro tip, you can quickly get into AppData folder without the need to enable hidden folders and lots of mouse clicks: just enter %APPDATA% in windows explorer’s address line and it will take you there. Works with any directory that has it’s own environment variable.

Good to know. I always enable hidden folders on my computers so I don’t know the details of what happens with hidden folders disabled. :wink:

I noticed your question shortly after you post it, and decided to unswer, but I was at PC where I couldn’t check how I am doing it, and yesterday I had absolute 0 time.
When I have read KiCad doccumentation (just before 4.0.7 was relesed) the only PCB design stage I felt I understand nothing about was generating the BOM. Now I know a little. In 4.0.7 BOM generation was only from Sch and I didn’t check yet how it works at PCB.
Step by step:
Haveing one of demo schematics open Tools|Generate Bill… and in opened window I first click Add Plugin button. Then I select directory: C:\Programy\KiCad\bin\scripting\plugins.
By the way - I always install KiCad not as it wonts to be installed (in Program Files) but in created by me folder “Programy” It is because Windows has something against modyfying C:\Program Files\KiCad\share\kicad\template\kicad.pro but nothing against if KiCad is installed not in Program Files. I trhink that when you open new project kicad.pro is copied for you. So after installing my first step is to edit that kicad.pro file. In 4.0.7 list of schematic libraries was in it. In V5 kicad.pro is less important, but I think (not sure as I have not really started to use V5, I am only collecting my footprint library now) that for example if you define your frame for schematic in it then it will be used for your “New” project.
Comeing back - from that directory I select bom_csv_grouped_by_value_with_fp.py. and KiCad fills the Command line as needed.
Now button “Generate” runs this plugin. As a result in project directory you get two files (project_name.xml and project_name (without extension). It is easy to overlook that second one but it is csv promised by plugin.
I don’t know what for is that xml. After adding .csv I can open it with OpenOffice.
I have checked that If you change “%O” to “%O.csv” in Command line in Bill of Material dialog box you will get your csv with right name but I don’t know if it is the right you should do it. May be it should be done by modyfying something in plugin file, but I don’t know python.

People here helped my to change csv I get from this plugin. If you are interested read:

xml is generated by eeschema, plugin converts that xml into csv or whatever the output of the plugin is. If you don’t need it it’s safe to remove.

It’s fine to do it yourself if plugin doesn’t do it automatically.

I understand this xml as temporary file generated by plugin. If such file is located in any TMP directory where I am not looking ten I don’t care. But if it is in my working directory then I think who have generated it he should delete it.

Hi Piotr
I just tried your instructions and it worked ! But I get the file name without the .csv as well, so I will change that %O to %O.csv and see if that fixes it. Easy to miss that file in the directory otherwise. I am so new to all this I am just wandering around in the dark a bit but I am making progress and I can say that I like the KiCad system very much. It looks like it will be perfect for my needs once I learn the proper commands and workflow involved.

My current struggle is with the 3d viewer. It seems there are no 3d shapes in the installation of KiCad 5.0.2 - but perhaps you have to download and install them yourself ? I am digging though the manuals for that information now but can’t seem to find it, or where I have to put the files etc…

Thanks very much for your help. I agree, that .xml file is a bit of a nuisance when it “hangs around” in the project directory, but that’s ok. Once I know what it is, I can delete it myself.

Lewis

Lewis,

(1) To get the footprints to work,
read SembazuruCDE 's reply of Aug 28th to tdarlic here:


and note where he says
“3D library included with KiCad doesn’t actually have a 3D object for every footprint”
There is another library I had to install

(2)To get the 3-D to work,
This is the package I had to install on October 18 to load the 3D libraries.

apt-cache search kicad-packages3d

(Am using 64-bit debian linux–tyou’ll obviously need a different tool to install
the software on 64-bit MS Windows.)
Rene_Poschle explains why here:

Hope this helps, I am just a newbie myself.

Well Russ, that helps a little bit. I’m flailing badly here at the moment. I have found all the 3dshapes - they seem to be in the right directory, but they are not the same as the one from the KiCad github listed in the menu on the KICad home page. They look to be somewhat less. Also, I have made a little board with a few JST connectors and a few resistors - the resistors appear in the pcb 3d view, but not the jst connectors. Sure enough, the JST connectors seem to be in this github listing, but not the local listing.

Sooooo - I fired up this 3d shapes wizard and it tells me that I can’t write into the suggested folder on my PC … which is -
C:\Program Files\KiCad\share\kicad\modules\packages3d

???

There should be 3D shapes in the Windows installation of KiCad 5.0.2, that is one of the reasons why the install package is over 1GiB. They should be installed here: C:\Program Files\KiCad\share\kicad\modules\packages3d. If you check the KiCad path settings (in the Project Manager, EESchema, PCBNew, Schematic LIbrary Editor, Footprint Library Editor, or Assign Footprints editor see the Preferences/Configure Paths... menu item) check to make sure that KISYS3DMOD points to that path.

Note, not all footprints have an associated 3D object, but all footprints (should) have a pointer to a 3D object filename. The reason for the pointers if the 3D object is so when/if a 3D object for that footprint is created and added to the standard libraries the librarians only need to add the object with the pre-arranged filename. Otherwise they would have to both add the file and change the footprint libraries. These are different git repositories that don’t mutually track each other.

So, are you sure that you don’t have any 3D objects, or were you unlucky to choose footprints that don’t have 3D objects yet.

One more thing - thinking that perhaps this never-used download of version 4 was causing me some issues, I simply deleted the entire kicad directory in the roaming folder on my pc - fired up Kicad, it went through all the usual “first time” things, loaded up the fp-lib-table etc. but the same issue with preventing me from writing to the 3dshapes directory on my pc persists…

Ah the life of a noob…

That is Windows trying to save you from customizing something that is managed by the system installers. If you make a change and then upgrade the package your changes will either get wiped out or break the installer for the upgrade.

Sem… - I think I make have been unlucky on selecting parts as I do have the 3dshapes directory - I will re-check all the pointers as you mention though. Thanks !

So for me to get the 3dshapes that are on the KIcad github, do I have to put them somewhere else ? or can I somehow force them to go into the folder that Windows is preventing me from? (maybe that’s a bad thing though as you have pointed out…)