Update symbol fields but not the symbol

When you’ve customised a symbol in a schematic, is it possible to update the fields from the library, but keep your customised symbol?

In one project I have four of my typical customisations:

  1. “Alternate pin” names/functions are selected.
  2. Pins are shifted slightly to accommodate the names.
  3. A “Power Output” pin on a USB connector is changed to “Passive”, because it’s a sink not a source in this instance.
  4. An input/output pair is swapped left to right on a hex buffer for a neater schematic.

Because these are very specific to the schematic, none justify creating a new symbol. Particularly because at the moment database libraries are one-symbol-per-part.

So I just edit the symbol in the schematic and carry on.

All goes well until I make some broad changes to my library. For example, add a column or correct a batch of bad order numbers. I’d very much like to “Update Symbols from Library” so my BOM is correct and my ERC is accurate.

Alas, even with none of the options selected, symbols get reverted to that in the library, and I have to apply my changes again manually. I guess “Reset alternate pin to default” doesn’t do what I think it would (perhaps because I’m using a database library, where the symbol is a field…).

I found that I at least can get a list of the symbols that will be mucked up - if I run ERC it tells me which symbols don’t “match copy in library”. They’re the ones I’ve tweaked.

Otherwise I’ve found that selectively updating symbols is cumbersome and error-prone, as is copying data into the Symbol Fields Table. Unfortunately the best I have is updating all and then re-applying my tweaks manually. Which for a 100 pin MCU with alternate functions, is a real drag.

Wait what? I just tried this again and alternate pins were preserved! I think this might have been fixed in 9.0.4?

Okay, that solves the biggest hassle. So now my question just relates to the symbol graphics and pin types.

This request feels kinda weird as “updating a symbol without updating it” :crazy_face: but it also makes sense. KiCad has added a lot of properties to symbols over the years, and updating or resetting some of the other properties while not updating the graphics in the schematic also feels like something a user may wish to do.

I had a short peek at gitlab to see if I could find a feature request for this, but did not see it.


On a side note, a few days ago I had an idea for adding an (optional?) link to “external graphics” to symbols. This would add the possibility to KiCad to add different graphics, for example for symbols with different pinouts, or just pins in a different location (such as customized pin location to fit a schematic better). In some ways this seems a simple addition, but also a huge shift into how libraries in KiCad work. It also feels more “in line” with database driven libraries, where a complete symbol is assembled from a bunch of different sources.

I’m a new user and have yet to verify my workflow and through my discussion with ChatGPT today, you should be able to have multiple symbols per part when using a database. The strategy is to put multiple symbols in the symbol column with a special separator like |. You then create a view from your parts table with a new unique index. KiCAD can load this view and you will see two lines with the same part number but different symbols.

CREATE VIEW kicad_symbol_variants AS
WITH RECURSIVE
split(PartNumber, Value, Footprint, Filter1, Filter2, rest, item, idx) AS (
SELECT PartNumber, Value, Footprint, Filter1, Filter2,
Symbols || ‘|’,
substr(Symbols || ‘|’, 1, instr(Symbols || ‘|’,‘|’) - 1),
1
FROM parts
WHERE Symbols IS NOT NULL AND Symbols <> ‘’
UNION ALL
SELECT PartNumber, Value, Footprint, Filter1, Filter2,
substr(rest, instr(rest,‘|’) + 1),
substr(rest, 1, instr(rest,‘|’) - 1),
idx + 1
FROM split
WHERE rest <> ‘’
)
SELECT
PartNumber || ‘#’ || idx AS KiCadKey, – surrogate key for KiCad
PartNumber,
Value,
Footprint,
Filter1,
Filter2,
item AS SymbolLibId
FROM split
WHERE item <> ‘’;

Above is what ChatGPT gave me as an example to create the view but I’ve yet to test it out.

I was also looking into multiple footprints and it looks like it is builtin now but if I’m right, you have to place the part again if you change your mind on the footprint. The approach I will try to use is to add alternate footprint columns in my table. These are actually footprint filters but they don’t need to have wildcards. Map the table footprint to the footprint property as the default but also map the footprint to the footprint filter. Map the alternate footprints to the footprint filter as well and you will keep a list of all approved footprints as multiple filters to the symbol when you forward annotate to the PCB.

This is all theory on my part but when I get to making my workflow functioning, I’ll try to post a tutorial. Anyone part of the KiCAD team might be able to confirm or correct this approach.

As an extra note, I think the generated view needs an index that won’t change as you add parts to your main part table. It should be the part number combined with a symbol count if possible. The devil is in the details but that’s the approach I plan to take. If needed, I would script a new table for KiCAD from the parts table. With a large database, this will have better performance than a generated view.

I’m afraid your generative friend is just providing noise. A method for producing multiple parts, each with a different symbol, does not change the fact that parts (in KiCad) can only have one associated symbol (albeit, with an optional “De Morgan equivalent”, for now). It’s a good technique, but there’s nothing new here.

On the other hand, alternate footprints are supported natively. No need for generative complexity, just a ‘;’ will do to automatically set the filter.

But more importantly, this is all off-topic. The topic being updating symbol fields from the library when you’ve customised the symbol. I am explicitly looking for an option other than adding those symbols to the database.

Aye. The weirdness arises from the fact that database libraries are commonly used for atomic parts, while symbol libraries are used for, um… symbols. Yet both produce the same list of, um… symbols.

The fine manual puts it well:

Each database library entry maps a KiCad symbol (from another library) to a set of properties (fields) and usually a KiCad footprint (from a footprint library).

It’s the properties I want to update, not the “symbol”.

I feel like my workflow is pretty typical, but don’t we all?

Generalising the De Morgan feature might give us both what we desire. I like your use of the less ambiguous term, “graphics”. A symbol could well become a set of properties, one of which is (a list of) graphics.

1 Like

I wasn’t sure if the ; in the footprint would update the filter. It’s good to hear that it works this way.

I figured it was relevant to have multiple symbols because you could add new symbols to the database for the same part but create a new view of the table and then updating the symbol properties wouldn’t cause the problem you described. That’s just a theory at this point until I get it all setup to try multiple symbols myself for other reasons.