I want to export/import symbol fields to CSV file

In Schematic editor there is nice tool in Tools/Edit Symbol Fields. If I export my parts to excel (Libre office), it is then easier to edit parts library to my taste, no Field 5 or Field6, but Manufacturer 1, and Part type and so on.
But there is only export, can I import the spread sheet back to KiCad library?

My aim is to get neat libraries without editing every part I use

If you want to go the route of fully specified libraries, then the database driven library system is a better choice.

… But setting up a database is a bit complicated. Maybe it’s doable to write a database interface in between a spreadsheet and the KiCad library system. LibreOffice supports scripting, Maybe it can combine metadata with symbol and footprint data to create fully specified libraries. I don’t know how efficient this is. It would be pretty similar to setting up a database driven library, maybe it is a little bit simpler. (But probably also less flexible)

It looks like it is easier just to modify libraries and stay away from databases.

For the near future and small libraries: yes.
For a longer period, and big libraries: maybe not.

Lets try to do a frame shift in thinking.

  1. A spreadsheet is a database! Therefore your asking how do a connect a database into kicad, and then conclude databases are hard.
  2. A database is generally considered to have a standard server interface, which you don’t know how to use. But databases existed before the advent of this idea so that is strictly not necessary.
  3. You are suggesting using CSV as a database copy action from database to database. Yes that’s what it was designed to do.

I really think the right answer is for you to learn how to use a database. But yes you can do option 3 too. It too is not hard, about as much work as using a database, All you really need to do is make or find a connector which amounts to exactly the same thing as learning to use a database.

Kifield

Interesting.
But development seems to have stopped, and there’s no support for V8.

why not HTTPLIB then?

i tested it out via making a very simple server, here it is: Anton Savov / as_kicad_httpserv · GitLab

HTTPLIBs basically allows (i assume the same applies to database libs) a library of symbol aliases from real libraries
to clarify:

  • a real library is the normal ones in kicad which define symbols with their visual look and other properties, these allow aliases but only within the same library (e.g. MyFancyResistors lib cannot use Device:R to make an alias of it)
  • HTTPLIBs (and database libs) cannot actually define a real symbol out of thin air, they need to take an existing symbol from a real library and only change some of its metadata, this allows you to use Device:R as a base without defining it, and you can sprinkle metadata on top

anyway, the program i made is not really “finished” nor polished, but it has a few features and practicaly can be used

it uses a custom plain-text format for the component data, which is explained in the readme, but this format is potentially subject to changes
it also supports converting a .tsv file to the custom format

so basically, if you want to try this, i suggest you use .tsv
.tsv is like .csv except the separator is a tab, and thus there are no double quotes or other things
LibreOffice Calc should be able to load and save such file by adjusting the import/export settings

if you have a list of components already in some format that can be stuffed into a spreadsheet, then you could export a .tsv out of that just to test it
in my case i can use my BOM tool to generate a merged BOM of all of my projects so far which will quickly group similar components and then spew out a .tsv

Interesting.
How exactly it is started, or how it is ran.

I tried to edit library fields manually, but the editor is basic and has some features not bugs. And field contents vary, and fixing all 70, I have, will take time.

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