True components library

I’ve done a lot of reading in this thread, and the EEVBlog thread, and it looks to me that most of the comments indicate that users don’t know this function now exists.

Confirmed :slight_smile:
Just copied the whole component table to LibreOffice Calc, by using “tab” separtion instead of the default comma while importing.

Then I tried it the other way around, and it seems that if you paste data for multiple cells into the Symbol Fields editor it’s pretty buggy. I’ve had several failed assertions which made Eeschema crash completely. The assertion seems to fail when there are more spreadsheet fields copied into the table than fit in the table.

Application: kicad
Version: 5.0.2+dfsg1-1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.63.0 OpenSSL/1.1.1a zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-1-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
Boost: 1.67.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.62.0
Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON


ASSERT INFO:
…/src/generic/grid.cpp(1108): assert “Assert failure” failed in AppendRows(): Called grid table class function AppendRows
but your derived table class does not override this function

BACKTRACE:
[1] wxGridTableBase::AppendRows(unsigned long)
[2] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[3] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[4] wxEvtHandler::TryHereOnly(wxEvent&)
[5] wxEvtHandler::ProcessEventLocally(wxEvent&)
[6] wxEvtHandler::ProcessEvent(wxEvent&)
[7] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[8] wxEvtHandler::DoTryChain(wxEvent&)
[9] wxEvtHandler::ProcessEvent(wxEvent&)
[10] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[11] wxMenuBase::SendEvent(int, int)
[12] g_closure_invoke
[13] g_signal_emit_valist
[14] g_signal_emit
[15] gtk_widget_activate
[16] gtk_menu_shell_activate_item
[17] g_closure_invoke
[18] g_signal_emit_valist
[19] g_signal_emit
[20] gtk_propagate_event
[21] gtk_main_do_event
[22] g_main_context_dispatch
[23] g_main_context_iteration
[24] gtk_main_iteration
[25] wxWindow::DoPopupMenu(wxMenu*, int, int)
[26] wxWindowBase::PopupMenu(wxMenu*, int, int)
[27] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[28] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[29] wxEvtHandler::TryHereOnly(wxEvent&)
[30] wxEvtHandler::ProcessEventLocally(wxEvent&)
[31] wxEvtHandler::ProcessEvent(wxEvent&)
[32] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[33] wxEvtHandler::DoTryChain(wxEvent&)
[34] wxEvtHandler::ProcessEvent(wxEvent&)
[35] wxGrid::SendEvent(int, int, int, wxMouseEvent const&)
[36] wxGrid::ProcessGridCellMouseEvent(wxMouseEvent&)
[37] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[38] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[39] wxEvtHandler::TryHereOnly(wxEvent&)
[40] wxEvtHandler::ProcessEventLocally(wxEvent&)
[41] wxEvtHandler::ProcessEvent(wxEvent&)
[42] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[43] g_closure_invoke
[44] g_signal_emit_valist
[45] g_signal_emit
[46] gtk_propagate_event
[47] gtk_main_do_event
[48] g_main_context_dispatch
[49] g_main_loop_run
[50] gtk_main
[51] wxGUIEventLoop::DoRun()
[52] wxEventLoopBase::Run()
[53] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[54] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[55] wxEvtHandler::TryHereOnly(wxEvent&)
[56] wxEvtHandler::DoTryChain(wxEvent&)
[57] wxEvtHandler::ProcessEvent(wxEvent&)
[58] wxWindowBase::TryAfter(wxEvent&)
[59] wxAuiToolBar::OnLeftUp(wxMouseEvent&)
[60] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[61] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[62] wxEvtHandler::TryHereOnly(wxEvent&)
[63] wxEvtHandler::ProcessEventLocally(wxEvent&)
[64] wxEvtHandler::ProcessEvent(wxEvent&)
[65] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[66] g_closure_invoke
[67] g_signal_emit_valist
[68] g_signal_emit
[69] gtk_propagate_event
[70] gtk_main_do_event
[71] g_main_context_dispatch
[72] g_main_loop_run
[73] gtk_main
[74] wxGUIEventLoop::DoRun()
[75] wxEventLoopBase::Run()
[76] wxAppConsoleBase::MainLoop()
[77] wxEntry(int&, wchar_t**)
[78] __libc_start_main
[79] _start

The circuit designer designs the circuit and someone else decides if it is SMD or THT or both. You can do a lab proto with THT because it is easy to instrument and test but go SMD for production. Both use the same schematic.

You can, but I have never used such solution. Have you?
I think it can be usefull only in some very special situations and only in very limited scope.
For example I would never assume EMC tests of any THT PCB would be comparable with SMD PCB behaviour.
Schematic is for me 20% of work, and PCB 80%. Designing two PCBs for one schematic - I would not like it.

1 Like

I think this project summarises some of the aims of this type of workflow
https://github.com/turdusmerula/kipartman and this was discussed previously in this forum.
Place components from SQL database

I still think there is value to a workflow that enables an ‘Add symbol from database’ alongside a conventional ‘Add symbol’ workflow.

There is a difference between having some parts of the symbol (like order information) found in some database and having the symbol in the database.

To be honest i still do not see the benefit of having the information that is in the database then embedded into the schematic. Simply use some single field as the key to tie together the database and the schematic. This allows you to update order information without changing anything in the schematic. (The schematic itself likely stays valid much longer than order information for digikey, farnell, …)

1 Like

And again the solution is an in-house part number.

Just because some EDA softwares does ties everything to the database, this does not mean that they should.

One issue that I have is that the current “link path information” is shown in the Schematic Fields editor for the Footprint. I don’t really care about the path information, I just want to declutter and show just the Footprint Name; if it’s a KiCad library I’ll know just by they library conventions.

Number 3 is really good idea. At the moment, the 3D is assigned at the Footprint level; but does this really make sense in the context of this thread? Why not assign the Footprint and 3D model with the CvPcb tool? … and BOM and Database stuff?

All that would be needed is for all Field Information to be available to read and edit in all 3 programs.

I’ve wished for a feature that I call “palettes.” A palette entry would be a pre-defined combination of a schematic symbol and fields, which could be instantiated from eeschema, just as you can instantiate symbols from eeschema.

This would be exactly the same as making a personal symbol library with predefined fields, except that the schematic would not remember which palette entry it was instantiated from; it would only remember the symbol name and fields. That way, someone who opens my schematic has to have the same symbol library that I do, but they do not need to have the same palette library that I do. Use of palettes would be a totally personal thing, and would not be visible to someone who downloads my project from GitHub.

This is what I intended to do by layout the path way in my scripts Back import custom fields

Sound like time to try my bom2sch.py scripts – It work very well for me :-). Back import custom fields

This call the configuration manager. And my script again just couple more line of code to be able to help apply difference configurations of difference section of the design… I just have not formula and have time to write them yet util I readily need in my own project. But I’m well come everyone to modify my code…

SQL database is the thing that hard to maintain, and access, and make every one so dependent on it to the point that no escape. So database should be see as a form a other type of file accessing to get your data. Instead interface it out, so people can scripting for any type of database, digikey API, octal part API Rest, personal mySQL, person csv file whatever so that the same search engine can be work on for get the part automatically.

And, indeed, that just happened.

The point is that the responsibility for setting up / administering / running any database is completely separate from KiCad - totally optional and absolutely and entirely the responsibility of the user. All I am suggesting is an possibility to hook into an pre-existing SQL database that the user can use to store their own components. This is simply a way of reading the data in and has absolutely nothing to do with maintaining the content/accuracy or completeness of the database. I am not suggesting that any development is spent on trying to maintain an actual database of all components - that is clearly madness and I have no expectation or interest in the developers actually producing a database. All I would hope to achieve is to populate the current F component fields and the DRAW/ENDDRAW library sections from an alternative source. Additionally, it should be possible to support looked up fields for footprint/model etc. also held within a database.

You say ‘interface it out’ - thais exactly what I am suggesting; simply the ability to use a database as an alternative the source of a part definition rather than a flat file.

It is absolutely not an appropriate expectation of Kicad to manage /administer/ install or otherwise interact with the database - simply offer the ability to pull in some fields from here rather than from a flat file. The point is that if (like me) you have a pre-existing SQL database which has some fields of interest that I want in my design and BOM, you could choose to select them from the database not from flat files.

There are many many tools for interacting with SQL and accessing and manipulation/sharing the data is very well supported and highly efficient. It is fairly straightforward to then develop tools that can manipulate and manage the SQL side. Unfortunately, for me the possible loss of Octopart access will perhaps have to make me reconsider the value of this.

Anyhow, I get the feeling that I am a lone voice in this so have no real expectation and I too believe there are some other features which probably deserve more focus. However, if the V6 > 7 > 8 … roadmap is not completely fixed, I think it is a possible consideration to bear in mind when making design choices.

1 Like

I think this topic deserves it’s thread. However, I’ve stayed away from SQL databases as one less thing to have to try to learn. Yet, it’s possible that I may well need to learn this in the not so distant future.

It also looks like adding this feature would satisfy the requirements of most of the users on the EEVBlog that did not consider KiCad to be a “real” design tool without it.

There might be more users that would appreciate this feature than is currently being displayed; as the squeaky wheel always gains the most attention.

Please create a new topic so that I don’t derail this thread with questions on exactly what functionality you might want with such a new feature.

Ok, I have read a lot of comment, sugestion and ideas, i’ll try to add some tough…

  • I realized that every people/company work in a different way
  • I think kicad maybe even better (simpler and faster to use) than very expensive software like Zuken
  • I realized I didn’t explained me so well, I probably don’t want a real database
  • I probably realized I’m interested more in a system to collect some data from web in a specific way than a real local database

Just one quote:

this is exactly what I mean, thank you @dchisholm!

If you are not interested in this functionality, you can still use KiCad as you are used.

If you want to generate something like a BOM from your schematic, you may want to add some information to symbols on your schematic. Double click on one symbol and you have just 4 predefined fields, fine. If I need to add some fields, I probably want every component in the schematics wich has the same type of infos, would have exactly the same fields attacched on it. Predefined fields (I have the italian version) are: Riferimento (Reference), Valore (Value), Impronta (Footprint), Specifiche (Datasheet), for example I may want to add manufacturer number so add a field “manf#” and this field should Always be manf#, no M. no. or manufacturer number. Other minimum fields may be Description, Supplier, Populated.
Ok, so you have opened dialog Windows for symbol properties, in the right of the Windows there is the field area, in this area (a different tab that opens in same location or anithing else) I set common properties for every symbol: this means empty (~) fields with fixed names: manf#, description, supplier, etc… In the meawhile, after a long search around the web I choose the exact part I want that symbol to be, copy link(?) from compatible website and paste in KiCad symbol properties window, then click a button like fill fields and get all stuff in place: manf#, Description, supplier, but also value, footprint, and specification get filled, directly from website.
A little extra to this approach, is to save a local copy of information acquired in a local database (read as csv o xml simple file, a flat table) if desired. Local copy and schematic symbol may have replaced corrected fields for example to fix a footprint not automatically linked or extra data like a company part number. Later I can use this backup copy to search for already used (in older projects) parts. When using a local parts description, automatically verify matching beetwen local and server remote data, alert if something doesn’t match.

I’am an hobbist? I can easily have a BOM from my schematics. I’am a little company? I can save most used company parts in a file that I can use to find components to place on my schematic.

Regards, Roberto

I was googling around when I found this video about librePCB, and its approach to libraries: https://youtu.be/vu-h5y6tK34.

If I think to myself when drawing a schematics, I place a bounce of components and connect them whith a couple of lines, look into a lot of datasheet to find some foundamental information, then apply some changes to the schematics, for example place a particular components, add a value to resistor and capacitor around it, maybe a comment in a field of some components that tells me something more about tolerance, voltage range, power rating… In each case, library and component annotation are the most important feature, add some labels and wires and you can make a schematics of any complexity, anithin else is useful but not foundamental.
When you have your schematic, add a footprint to each component (I try to add a footprint and a code to the component when I’am viewing its datasheet, doing this later is a waste of time to me) to get a board. this step is also strictly based on libraries. Only the last step, move footprints around and connect them by tracks is not so closely based on libraries.
After the PCB you would probably generate a BOM, here is another step based on the field you have filled when designing the schematics. If the BOM is not complete, simply add missing information manually.
I still think that library and fields associated to each components are one of the most important thing in the whole process.
I can’t understand why kicad has only 4 predefined fields for each components but has a bom generator utility, it’s seems to me a countersense: it’s not so if I manually add fields to each components, but this is not very practical.
May be I didn’t conviced you but, sorry, I’am still convinced that a good library sistem is a must have for every tool like kicad, and this could be the reason that makes so many company pay someone to draw and mantain library.
But library must be easy, I don’t like aliases, I don’t like to have a normalized specific part of every components I place into the schematics as I must do when I’am at work.
I like to use generic symbols in my schematics, add data to create a given part, if this is not done only manually this could be faster and less prone to errors. Get data from commercial website, why not? Save in a local archive and recall each time you wont, this is just a bounce of textual data and the ability to fill-in in a semi automated way, and if you don’t want this, this doesn’t change the way you already use Kicad.

In short:
Which is the importance of librares in your opinion?
Which data do you fill in kicad schematics?
How do you use kicad BOM tools?
How do you do the BOM?

By, Roberto

1 Like

Have you seen this link?
https://forum.kicad.info/t/for-those-fans-of-atomic-part-libraries/15212

1 Like

Thank You paulvdh, there’s a lot of stuff already out there… This seems to be the topic of this discussion:

Other tools can fetch data from a web page, having both seems to fulfill my wishes, just wondering if I can fetch data in kicad-db-lib database!

Thank you a lot, regards,
Roberto!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.