Advantages of working with custom saved Symbols only

Thanks for your replies all …

so, let me get this straight - Kicad uses the term library in vastly different ways, including in reference to a schematic symbol ??! … and also, in reference to a collection of schematic symbols ??!

also, WHERE does the official documentation cover all this file structure stuff ???

Thx!


https://kicad.github.io/symbols/

Symbols

The KiCad symbol libraries are the individual .lib files, with the corresponding .dcm files containing symbol metadata. These symbols are best used in combination with the official footprint libs.

Requirements

The files packaged here are intended for KiCad version 5 or nightly builds that support the schematic library version 2.4 or newer.


page 6 needs filling in here :slight_smile:

https://docs.kicad.org/6.0/en/introduction/introduction.pdf

found it, well some of it …

https://docs.kicad.org/6.0/en/eeschema/eeschema.pdf


at the bottom of page 85 …

This I find confusing …

Symbol Library Editor Overview

The symbol library editor main window is shown below. It consists of three tool bars for
quick access to common features and a symbol viewing/editing area

maybe I’m being pedantic here, but shouldn’t that more simply read only as Symbol Editor ?!

Maybe, maybe not. My gripe about usability of that editor has been that it tries to do two different things in one UI, namely editing individual symbols and organizing symbol libraries. So you can’t know which main menu item belongs to which task. For example “Copy” may mean “Copy symbol from library” or “Copy item inside symbol”.

Then again, that assumes that all the symbols are correct.

Look under the Interface ICs for the “MC6840”. That is actually the MC6821 PIA!
(I have a correctly drawn MC6840 PTM symbol in my personal library, among other rare ICs, but don’t really have the time / patience to go through the process for submitting them to gitlab)
Symbols.kicad_sym (32.3 KB)

At least an issue may help tracking down stuff like that.

I tried jmk’s instructions but got stuck at this:

This will bring up a “Select Library” page and again use “Other Locations” to find and
highlight the new libraries you wish to add.

doesn’t allow me to select the Custom Symbol folder per se, it makes me enter it instead …

same thing happens if I try to create new Library from within Symbol Editor it tried to create a kicad_sym file (within my Custom Symbols folder) … I would expect it to create a folder, no ??!


found this just now,

https://forum.kicad.info/t/creating-a-new-symbol-library-and-a-new-symbol-in-kicad-5/13341

more reading …


btw, are .lib files a thing of the past starting with K6 ?!

thx Andy,

so, just to confirm, kicad_sym can represent symbol libraries and also symbols per se ??

.kicad_sym is a symbol library (and a normal file within the filesystem) so would normally hold multiple symbols, but of course a library could also contain 0 or 1 symbols.

For example here are selected lines from my nixie.kicad_sym:

$ grep symbol lib/kicad/Me/nixie.kicad_sym
(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
  (symbol "B-5853" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (symbol "B-5853_0_1"
    (symbol "B-5853_1_1"
  (symbol "B-5991" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (symbol "B-5991_0_1"
    (symbol "B-5991_1_1"
  (symbol "CD66" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (symbol "CD66_0_1"
    (symbol "CD66_1_1"
  (symbol "CD71" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (symbol "CD71_0_1"
    (symbol "CD71_1_1"
  (symbol "IN-8-2" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (symbol "IN-8-2_0_1"
    (symbol "IN-8-2_1_1"
  (symbol "NL-841" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (symbol "NL-841_0_1"
    (symbol "NL-841_1_1"
  (symbol "NL90x" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (symbol "NL90x_0_1"
    (symbol "NL90x_1_1"
  (symbol "Z566M" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (symbol "Z566M_0_1"
    (symbol "Z566M_1_1"
  (symbol "Z57xM" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (symbol "Z57xM_0_1"
    (symbol "Z57xM_1_1"type or paste code here

The first line is the enclosing library declaration and the symbol lines after that are the symbols (or derived symbols).

thanks for that retiredfeline,

in other words, the Custom Symbols folder I created manually inside my home/Kicad folder is holding a bunch of kicad_sym libraries (… what I’m incorrectly thinking of as symbol files - in the same way kicad_mod files are single footprints in my Custom Footprints folder) some of them holding one single symbol.

what I’m hearing is that the actual “symbols” themselves are but lines of code inside these librairy files and not separate file themselves.

… am I getting this right ?!

Yes.

No, not in the same way. .pretty libraries are really directories or folders, and a .kicad_mod file within a .pretty directory is a single footprint (not symbol, be careful with nomenclature, terms have defined meanings within KiCad).

Thank-you, again …

exact meaning of the terms used in Kicad is what I’m after

where is all this described in the docs ?!

The exact implementation of libraries shouldn’t concern most users since they may change in future KiCad versions, but the conceptual structure will remain.

If there is a single fact that KiCad users should know it’s that there are three major entities of interest.

  • symbols, what you work with on a schematic
  • footprints, what you work with on the PCB
  • 3D models, what you see in the 3D viewer

The three entities are decoupled, a symbol can be associated with more than one footprint (think of components available in multiple packages), and a footprint can be used for more than one symbol (think common package outlines). Although a symbol may specify a default footprint, which can be overrriden in the schematic editor.

Within these entities, you have pins, numbers (more correctly pin IDs), pin type, pads, etc. etc.

Sorry, I’m not involved with writing the docs and I usually forget how I picked up various bits of information. I think I learnt the most from the book and course by Peter Dalmaris back in v5 days. There is a new release for v6 and I think it’s worth paying for.

btw, how does one bring graphics and tables into this forum ?

Thanks for your reply jmk, this time around it made more sense … a few questions if I may:

yes, I got this far … and verified I’ve got an empty (shell) kicad_sym file with the name I gave it residing in my new Symbol folder …

by giving the library global status the listing already
appears there, all good … (I think)

from here things don’t work out somehow though,

this is where a conflict appeared as it was trying to overrite the same file name in that folder …
so, I stopped there

this is where I get confused and I don’t see them the same way at all … for me, footprints are (kicad_mod) file/objects, as I have them in my Custom Footprint folder for example - did a few projects with them, seem to work ok … bottom line, one file per footprint … whereas, so far as i get it, symbols exist as code snippets inside (kicad_sym) library files - and so don’t exist in separate files per se unless a library holds exactly one symbol (I guess)


here’s a simple way I see using this, say I want to have different 1n4148 diode symbols, one each for different vendour sources. I could see having a 1n4148.kicad_sym library file with the three symbols coded in.

Is this congruent with the intended usage ?!


thanks for all the replies

Of course. But you’d have to give them different names, say ti-1n4148 for the one by TI and os-1n4148 for the one by OnSemi. If they were in different libraries, then of course they could be both 1n4148 since they are distinguished by the library they reside in.

But this is only a hypothetical example, after all how many ways are there to draw a diode with 2 pins? Footprints will differ due to different packages, sure.

of course, they would have different names …

editing the shape of the part is quite secondary for me at this point

let me reframe the question:

what’s the quickest way of saving a copy of a schematic symbol along with its associated properties ?!

so far, I’m not having luck saving something (anything) in the kicad_sym file inside the folder I created


the idea is to have, say, a 1n4148.kicad_sym library file inside my Diodes folder that contain “symbols” which use the same symbol graphics and settings, but have different associated vendour link and associated footprints in the properties window. Different symbols per se, but in fact different instances of the same thing but with altered property attributes

Assuming you have the symbol in the symbol editor window, do File > Save As. This will then bring up a dialogue asking what new name if any to give it, and the library to save to. Scroll down until you find your library, and save to that. The system ones will not be writable because they are meant to be read-only.

You might want to read up on the symbol inheritance feature that might allow you to derive many symbols from a parent symbol. First you have to create the parent symbol, and then when creating new child symbols, use the derived from field in the properties.

I consider it a UI flaw that you have to create the writable library ahead of time, instead of there being choice to create a new library at the save as popup.

… by way of sheer luck I finally found my problem!

Turns out after I hit “save to that” I also have to hit save a second time before closing the Symbol Edit window otherwise the kicad_sym file doesn’t get re-written … I went through this a few times and took notice of the pop-up box that warns about changes not being saved (I thought this only referred to visual shape and text edits of the symbol per se so I ignored it at first)


sure enough, the kicad_sym text file looks good testing by way of two different attribute sets (with different names) starting from a duplicated schematic symbol and edited for different properties and footprints …

now if I go to the Symbol Browser I see both symbols appear inside their designated library header while showing correct inner properties when hovering …

I can also now edit the “description” field as it shows in the Symbol Browser

must say … it’s all too beautiful


I want to thank you all for sticking with me // having this understanding is a game changer for me …

:slight_smile:

No worries. Have fun!

So all is well with @kicadian ?

Has Libraries in folders that can be accessed by Kicad?