Symbol Library Editor Changes

A major change to how symbols are handled has been merged into the development branch of KiCad. If you run nightly builds, this change will affect you in the very near future. Everyone who uses KiCad is familiar with adding aliases to symbols. This concept is now gone and has been replaced by symbol inheritance. This means that the “Aliases” panel in the symbol editor “Library Symbol Properties” dialog is now gone.

To create a symbol derived from another symbol (alias), create a new symbol and select the
root symbol from the list of root symbols that you wish to inherit from. If no symbol is selected in the “New Symbol” dialog, the symbol will be root symbol.

symbol_editor_new_symbol_dlg

These changes required changes to the symbol editor behavior. Derived symbols cannot be edited except for a limited set of properties (the same properties that could be modified for aliases) using the “Library Symbol Properties” dialog.

The symbol editor window will show inherited symbol elements grayed out as shown below and all of the editing buttons will be disabled.

You now have to select the root sheet in order to change the root symbol elements. This also makes it clear when you are viewing a derived symbol versus a root symbol. Prior to this change, selecting an alias always allowed editing of the root symbol.

I know this is a major change and will require some adjustment but this is where the new symbol architecture is going. I don’t think it will take long to adjust to as it seems fairly intuitive if you understand the concept. This was a significant change so there are likely bugs. If you find any issues, please file a bug report so I can get them fixed.

6 Likes

See issue https://gitlab.com/kicad/code/kicad/issues/3649

By the way, when opening a derived symbol in the editor, it would be nice to have actions for “open base symbol” and “transform into copy of base symbol”.

And a question: which parts of a symbol can be overridden by a derived symbol except the name/value? Overriding pin-numbers/names would be very handy. We could then have a single “quad op-amp” base symbol which could be used for all quad op amps regardless of pin layout.

You can already do this by right clicking the symbol name in the tree pane and selecting “Save Copy As”.

Please read the above carefully. No new inheritance capabilities can be added until the new symbol library file format is implemented. This is a limitation of the exiting file format which is currently frozen.

You must mean the “transform” part. I don’t find a way to go to the base symbol from the inherited symbol. This is a fundamental difference between the old and the new system: in the old it wasn’t possible to actually open and edit an alias symbol - the editor opened the root symbol when I tried. In this new system the editor actually opens the inherited symbol, or so it looks like. There’s no way to navigate to the root symbol except by selecting it in the main tree list - but I have to navigate to it first in the tree list. I don’t know how much of this is thought out, but maybe a new dialog “inheritance tree” is needed where the user can easily find root symbol, inherited symbols and siblings.

As for the “transform into copy of base symbol” feature - it doesn’t exist, either. I can “save as” an inherited symbol but it stays inherited. I understand kymatica meaning that the new symbol would be a “deep copy” of the root symbol + the features of the inherited symbol and would become a new root symbol.

BTW, Save As to a new (different) library doesn’t work with an inherited symbol. In the old system the root symbol was copied along with it (or actually the root symbol with its aliases were copied, if I understand correctly). This doesn’t happen in the new system which seems to lead to problems. It looks like KiCad expects the root symbol to be in the same library. Try it yourself.

Confirmed behaviour here as well.

Whatever gets copied cannot be edited except some fields in the main properties form. The rest like pins are all grayed out. When copying an alias it should actually copy the root symbol instead. For now at least until there is some symbol lib change mechanism implemented.

Yes, exactly. I can open the properties dialog, see which symbol it inherits from, then manually find that symbol in the tree list. Here it would be nice with an “open base symbol” button. And then, I can right-click the base symbol and choose “save copy as”, but that makes a copy of the base symbol while what I was looking for was to transform the inherited symbol into a new root symbol.

Also there’s a lot of issues and crashes happening when I’m trying out the new symbol editor. See https://gitlab.com/kicad/code/kicad/issues/3654 and https://gitlab.com/kicad/code/kicad/issues/3653