I’m trying to split an existing Kicad symbol into 2 different units ie input and output.
I’ve copied the PC817 optocoupler into my own library and renamed it PC817_split.
I then changed the Number of units to 2 and unticked the All units are interchangeable box
This created 2 identical units A and B. When I delete the transistor in unit A its also deleted in unit B.
Same when I delete the LED in unit B its also deleted in unit A.
I know this is a simple symbol and I could create it from scratch in the time its taken to write this post but it also applies to more complicated symbols as discused in a post from 2021. The fix for that post involved hacking the symbol code.
Is there a simpler fix?
Thanks
David
@ML9104
As I said I know how to create symbols, I’ve done it often.
The FAQ suggests:
“There are two basic ways of creating multi-unit symbols:
1: copy an existing standard library symbol to your personal library and modify it (this is the easiest way).”
This is what I tried, it doesn’t work.
@retiredfeline
I also tried deleting pins, still end up with identical units.
It’s probably some combination of editing the pin table (which holds the mapping from pins to units) and editing the symbols in the units. But getting from single unit to multiple units may be more complicated than recreating. Remember that you can save a copy of the line graphics into the cut buffer for creating a new symbol.
I just tried it myself with the PC817. Sadly, there’s no easy way out.
Every graphic element in the symbol has a tick-box saying “Common to all units in symbol”. You’ll have to uncheck every single line in the graphic, and no, there’s no bulk selection function.
I’m just a user, not a developer, and I wonder how this strange idea came into existence.
In short: it’s faster and easier to draw the symbol yourself.
Every graphic element in the symbol has a tick-box saying “Common to all units in symbol”. You’ll have to uncheck every single line in the graphic, and no, there’s no bulk selection function.
That seems very odd indeed. I don’t have my KiCAD machine with me at the moment to test it out, but that is certainly something that would need addressing as it would probably classify as a bug.
I started to redraw this symbol but found that If I untick the “Common to all units in symbol” box in the properties for a line in unit A it deletes it from unit B.
Its a bit back to front but it does what I wanted in the first place ie deletes a line.
Symbol split in no time.
Thanks again for your help.
David