How to create a new symbol from existing one

This is where multiple pin compatible or similar parts need to create symbol (component). I already created first one and save it to a lib file or there is a similar one in library which I can load it into library editor. Now I have a symbol on screen that I want to edit from and save as a new symbol into the same lib file. I tried first: modify part name, it prompt me new name conflict with one in library and only ask me if I want to replace the existing one, of course I selected NO. then, nothing happened and I couldn’t get component name changed. Second, I click tag “create a new component from current one”, however, the same editing window popup, after I edited the name. the same prompt window come still saying the conflict and asking me to replace the one in library… when I select NO, it doesn’t create a new name for me…nothing changed…
Can any one tell where I went wrong?

I suppose your source schematic symbol have some aliases. By edit component name or clone via top toolbar commands You create new base symbol, but the aliases have been preserved from source symbol, and that’s why library editor warn You about some conflicts.

For example: XMega8E5 has two aliases.

Now when I want to clone it to the new symbol I’ve been warned about alias conflicts as soon as I gave a new name.

If you answer “Yes” then alias list from new component will be cleared, so you will have only base symbol with new name. The source symbol will be untouched.

1 Like

Hi Keruseykaryu
Thank you for reply.
The problem seems having nothing to with aliases. Both source symbol and my new symbol have no aliases at all.
here is what it prompt.

I don’t want to replace the one in lib, so I click “NO”.
BTW, The source symbol name is PCF8574A and my new symbol name is PCF8574. They are pin to pin compatible but from different manufacturer. The key reason I don’t like the one in lib is too big symbol size. I wanted to create a small size symbol by modifying the one in lib instead of by creating new from blank.
Anyway, I have another problem. I finally created a smaller size symbol with name PCF8574 (by creating new from blank) and stored into the same library. when I back to schematic, delete the big one and place component by selecting my smaller one, it always give me the big one…I went back to library editor and delete the big one (PCF8674A) entirely from lib file, Now, there is only my smaller symbol existing in library, but whenever I place my small symbol to schematic, it always give me the big old symbol body with my name (PCF8574) showing…
I feel agony by using kicad…is there some tricky thing behind the sense I don’t know or is it due to not well organized sloppy coding of open source project? I am big fan of open source, I don’t want to feel disappointment…

Hi Tony

What version of KiCad are you using, and on what OS?

You probably did this but I’ll ask just in case …

  • After editing the name in the dialog and clicking OK, you need to do File - Save Current Library.

  • This should bring up the dialogs below. Did you get these before you got the error message about conflicting entry?

About the second problem, might you have two copies of the symbol (part name) in different library files, but both listed in the libraries table? See here: EEschema using OLD symbol that is not in library anymore

Ray

some additional info: When I place component by selecting name PCF8574. the preview shows my smaller symbol. So I am sure my new smaller size symbol is sound and existing in library, which I have opened library editor to confirm it. Why I can not place it into schematic? I noticed there is one symbol in “history” list with my name but corpse of old big symbol , I can not preview the one in history list but I can recognize it as the corpse has different description from mind smaller one.

Can you upload your library file so we can check it?

And as a test, what happens if you start a completely new KiCad project and try to place your symbol? Do you get the old one or the correct one?

Hi Hackscribble
Thank you for help.
first I do see those confirmation prompt when I save current library.
Second, I checked the thread you post, seems similar problem to mine. it was Sep. last year existing in version 4.0.4. while my version is 4.0.5 (running under Windows 10). is the bug still in 4.0.5?
I will try a test with new project and report outcome here.
Thank you again

The bug or feature :smile: is still there, I think. If the same symbol name is in two or more library files, KiCad will place the one in the first library in the library table.

About the original PCF8574A symbol. Was that from an existing KiCad library? Or did you create it first in My_Linear.lib and then you tried to create the PCF8574 symbol?

Just did a test:

  1. open a new project.
  2. click preference and component library to add “My_Linear.lib”.
  3. place a component and select PCF8574 name, the previews show my smaller symbol perfectly.
  4. click Ok to place it…the corpse comes again…I don’t know where it come from…The big symbol named PCF8574A has been deleted from My_Linear.lib already…Now the corpse occupy the “history” list and using my symbol name…stopping my symbol from being placed…
    The corpse (PCF8574A) has been placed into schematic before I created my one…it now hide somewhere I can not get rid of…

I don’t know where the corpse come from…I did not create it. I have no idea how and where it come into My_Linear.lib.
Here is how I get My_Linear.lib. I copied Linear.lib from Kicad original lib directory into my project directory (in different drive) and rename the file to My_Linear.lib which I add many new parts (symbols) used in my project. I have checked Linear.lib in Kicad directory, the big symbol of PCF8574A are NOT there…

When I needed this part I found it in My_Library and I placed it. But it is too big in size, so I wanted to modify it to smaller size with my name…that comes to the beginning of this thread…

Can you repeat the test but this time use the “up” button to move My_Linear.lib to the top of the list.

It’s possible that the symbol has been accidentally added to one of the other library files.

The PCF symbols exist in the standard philips.lib library :wink: :

So move your library above the philips one in the list. Or remove the philips library.

Why do you need do to this?
Well currently eeschem is build in such a way that it does not store the information from which library a particular symbol comes from. (Kicad takes the symbol from the first library where it finds a symbol with the given name.)
The suggested workaround works as long as you remember to do this for every project where you need this symbol.

A better way would be to give your symbol a unique name.
I would add some identifier to the name that explains the reason of why i did not use the symbol found in the standard library.
As an example give the suffix _MU if you changed it such that it is a multi unit symbol.
Give the package as suffix if your symbol needs a different pinout because of the footprint.
Or give it a manufacturer prefix if your symbol is for a device by a different manufacturer than philips.

If this is a symbol for a micro controller and you want to show the chosen function of the pins than add it to a project local lib and move this lib to the top in the component library dialog. (In this one case i would not change the symbol name.)

It is up to you which route you take.

  1. When I move My_Linear.lib up to top of the library list, I can place my small symbol now.
  2. I now can see both PCF8574 and PCF8574A in philips lib. I now know how every thing is happening…
  3. Kicad allow duplicated symbol name existing in different lib files and place part based on position of lib file.

This subject ( allowing same part name) may be controversial, let us put it aside.
My pain is: when I EXPLICITLY point to particular lib file and particular part I need to place, why Kicad give me a symbol from somewhere else? NO user will like such feature! Computer software has been used by billions users many decades. Don’t try some “smart or fancy” thing and ignore conventional user experience…

1 Like

At least when the time I create a symbol in my lib file with name duplicated with other symbol in other lib file, you let me know (alert me) the duplication if your rule is ignoring lib file and only looking at position of symbols existed.

When You keep silence and allowing me to create my symbol in my lib file, finally do not allow me to use my symbol from my lib file… what kind of SW it is?

1 Like

Like every other kind of software: it has flaws. If you found a way to write software without errors, let us know.

It’s a known problem, it is being worked on.

3 Likes

It is a flaw, but NOT like every other software! Such low level flaws are well managed in other software project by either product manager or project manager with proper testing setup.

Such flaw should be found during software flowchart review (before coding) not even seen by testing.

if you want to allow duplicated symbol name and a rule of searching symbol based on priority of position located in search list, there are three things (may be more) should be seen in software flowchart.

  1. When user create a symbol name, search the library list to find all duplication and alert user.
  2. When user add his own lib file via preferences/component library/add, his preferred lib file shall be set automatically at top of searching list by default. That is why you calling it as preference (means higher priority) setting. Does anyone do not think so? the whole reason you add your own lib file is you want to use it OVER the original lib files…
  3. When user explicitly select a lib file and a symbol with confirmation of preview, as long as you design such action flow, searching rule should be overwritten here, user pointed symbol should be placed. In worst SW design, a alert prompt should tell user another symbol with same name found and ask user which one to place…

Another example to show how low level this flaw is…
with My-linear.lib on top of the searching list, now I place a symbol by key in keyword in filter field, it show me all symbols with name duplication, I select any one other than the one on top of the list, it always place the one on top without any information…

I am not against any particular searching rules. In fact, rule doesn’t matter, the way how you treat user matters.
Software development (called software engineering) has been there many decades. thousands of ways to produce a user friendly SW product out there…but no body can stop you if you choose to ignore them and treat user in your own way…
.

1 Like

@Tony_Zhang

This issue is known about and as long as you don’t have similar named symbols in different libs, not a problem.
The NEW library format for symbols will solve it and doesn’t need the workarounds you propose.

PS: the issue stems from the fact that EEschema doesn’t address the library name as part of the identification for a symbol. PCBnew doesn’t have this issue (anymore), as there footprints are addressed with < lib-name > : < part-name >

1 Like