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

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…)

The Windows and Linux distributions are packaged differently. Windows is monolithic and Linux isn’t.

I just had another thought - If I remember correctly, I loaded those jst connector parts before I realized that I was working with the autogithub download footprint libraries and therefore a remnant from the version 4 Kicad I installed earlier this year but never got around to learning. Is it possible that that part(s) is now pointing to an invalid or non existent 3dshape in the new 3dshapes that have been installed as a result of the KiCad 5 installation ? Sorry for all this noob foolishess guys - I’m so green I don’t know what I don’t know - haha

This might apply: I had KiCad 4 installed previosly. Now i updated to v5. Now i have some problems with the library setup (Seems to have been already posted above but just in case you missed it.)

Yes, you want to put them somewhere else. Just to be sure, you are referring to the individual library repositories (symbols, footprints, 3d packages, and templates) for 5.0, not the combined repository for 4.0, right?

There are a couple ways to handle this. You can either download the entire repository (as a snapshot) and uncompress the archive where you want and have KISYS3DMOD point to that location. (If you download and/or create your own models either manually from datasheets, or by downloading 3d object files from the manufacturer or vendor, you should put them into your own library folder and create a new path name in the KiCad Configure Paths... menu item. I would suggest using a path substitution name of ALT3DMOD for future compatibility with the StepUp plugin of FreeCAD should you want to tweak downloaded 3d objects (usually positioning and sometimes scaling, sometimes painting colors).)

Or get set up with GitHub and download the repository that way so when there are changes to the repository (usually several updates each week) you can avoid downloading the entire repository. Git will download only the changes for you. This is the solution that I use, but I’m not versed in Git well enough to provide much support. (I got it working, hopefully correctly…)

As far as the location to save the repository, it needs to be in a location that doesn’t need administrator access to save files to. This can be in your Documents, on a 2nd data partition or drive, or in C:\Users\Public\Public Documents. The public documents is a special Windows feature that allows all users of the computer to access the files.

That said, the libraries in the 5.0.2 distribution are only a couple weeks old compared to the github libraries…

(@Rene_Poschl, please confirm that my assumption that a snapshot of the github libraries was taken when the Windows 5.0.2 package was built instead of using the snapshot from when 5.0.0 was released.)

Guys - thanks a million for all your help here - and thanks for your patience ! I am going to have a long read of these links you’ve supplied. It’s noon here in my part of Canada and I just realized it and my wife is waiting at her work for me to pick her up…I am going to get a blast from her when I arrive there late…hahaha. But I will tell her I was late for a good reason - learning to set up KiCad ! I’ll be back later.
Thanks again,
Lewis

That is a distinct possibility. The FAQ item that I linked to way up and that Rene just linked to has a link to a post I made with a procedure that I developed for myself for updating legacy projects to 5.0. See step 12 in my procedure, the one that starts with Update the footprints in on your board. That should (among other things) reset the pointer for the 3d objects to the 5.0 approved path/filename. Note, you may still need to start the updating at the schematic level so link to the footprint library is the correct one… :wink:

Back again !

ok - I have tried out a quick “test” to confirm my suspicions and it seems that what I was thinking might be the case, is in fact what is going on. I placed a new connector symbol on my little schematic, then cvpcb’d it with a jst footprint, then created a netlist. I then went to pcbnew and loaded the netlist, placed the new jst footprint (which looked a bit different than the others but I may have selected another variation…not sure) on the board layout. Then I went to view 3d of the board and sure enough - the connector is there on the board and the others are not.

Careful looking at the 3dshape reference when I click on the pcb footprints reveals a footprint that I can’t seem to find in the library. SO… It appears that before I realized I was using the github plugin for version 4 in the fp-lib-table, I had placed the jst connectors on the board. Then, when I cleansed the /roaming/kicad stuff and got a “true” 5.0 installation, these footprints were then pointing to a non existent 3dshapes location.

This little board, while something I am going to make eventually, is not big - I will probably just nuke the jst connectors - and the few TO-220s that are in there too that don’t seem to show up, and bring in new symbols and regenerate the cvpcb and netlist etc. again. In summary then, I think we’ve solved it - and I’ve learned some new stuff in the process thanks to the feedback I got here.

The comments given on the location for the new 3dshapes instead of the one set up by the initial installation of Kicad, has me wondering - when I get to the point of having a different location for them, and then d/l or github sync’ing them, can I just delete all the 3dshapes that are in the location where they were put when I installed KiCad 5 ? i.e the location C:\Program Files\KiCad\share\kicad\modules\packages3d Or will this “break” the installer as was mentioned earlier? Seems an awful waste of space if I have to leave all these obsoleted 3dshapes in there. For the moment, I won’t be doing any of this if this little board I am working on has all the stuff I need from the initial install 3dshapes, but eventually I’ll bring down a fresh load. I want to read the docs more and get the eeschema/pcb layout stuff under my belt more first.

My suggestion:

  1. Uninstall KiCad, and delete your Roaming\kicad dir.
  2. Install KiCad but not in Program Files dir but in any created by you.
    I am doing that way since with first installation of 4.0.6 I noticed Windows knows better then me what I need to do and what not (I couldn’t modify kicad.pro).
    From what you and others write it looks (I/m not sure) the Windows can be the source of problems.
    As I have written previously I have installed 5.0, then 5.0.1 and then 5.0.2 in my Programy dir and noticed no problem with 3d except that for some parts KiCad don’t have 3d yet.
    I have never had anything to do with github. When I installed 4.0.6 and before first run I looked through its files and noticed that there is fp-lib-table and also fp-lib-table.pretty. I looked inside and found that this second one is the same except it points to files on local disc and not to external world. As since 2 years I work on PC disconnected form internet I was looking if I can use KiCad without connection so it was just for me. I renamed thet files and run KiCad with no problem on my isolated PC. V 5.0.2 is configured by default to work locally. But if you had something left from 4.0.7 may be some informations propagated to your schematic or pcb files, and even you removed ewerything form your Roaming\kicad there still are some connections left.

My comments apply only to the Windows installation. I don’t know if any of this will apply to other target OSes as I’m not familiar with how they are packaged together nor the installation process.

I’m not sure. But what you could do is d/l or github sync all 3 libraries (schematic, footprint, and 3d objects) and then either uninstall and reinstall KiCad, or simply install over the existing KiCad and turn off the installation options for the libraries. I’m not sure which will do the desired effect because I don’t know how much cleanup the installer will do if installing without libraries over an existing installation that has libraries. Unfortunately, I think the 3d library will be installed with the footprint libraries, no way to turn just that off.

The complexity with updating the footprint and symbol libraries is there may be new libraries added and one would have to manually reconcile the additions to the library tables from the git repository vs. the ones in AppData. (A simple copy would work only if you never create your own libraries and add them to the global library tables. If you only ever add your custom libraries to the project specific tables it might work, but then you will have to copy tables from project to project.) Also, once 5.1 is released and the target becomes 6.0, I don’t know if the librarians will start trying to optimize the organization again.

Oh, one clarification. As far as the option to sync with github for the libraries, I’m not talking about using the github plugin like 4.x used. I’m talking about using Git (either command line or the GitHub Desktop app) to clone the repository. And then using Git to periodically (or occasionally) update the local to the online. KiCad will think all the libraries are local.