In my present schematic, I committed the error of renaming a power port GNDREF into PGND before copying it all over the schematic. Now as I work on the layout, I see all of these grounds named GNDREF instead of PGND. The renaming did not work as intended but the appearance of the schematic showed PGND.
The Find function (Cntrl-F) was unable to find GNDREF (even with hidden text checked) both in the pcb and the schematic, even though I could see GNDREF as a labeled net on many pcb pads. Why was this?
After a few manual swaps I opened the schematic with a text editor and did Find-Replace. I think this did the trick. But I don’t think I should have needed to do that. Am I missing something?
So I took one of my STM32 projects and tried to rename the “BOOT0” pin. With Eeschema / Edit / Find and Replace I could rename the label, but not the pin name in the schematic symbol.
Even if I did have the “Search pin names and numbers” checkbox on. It does search and highlight the “BOOT0” pin, but does not replace the text. Do you consider this a bug or a feature?
If you do the search & replace with a text editor, it has no such qualms.
Changing schematic symbols is usually reserved to the schematic symbol editor. I find it quite understandable that a “search and replace” does not change texts in the schematic symbols themselves.
Also note there is an extra checkbox for Replace matches in reference designators and this has to be enabled separately.
Also:
With KiCad V5.1.x and earlier this would not even have been possible because schematic symbols were only linked into the schematic from external libraries. KiCad-nightly V5.99 is the first version in which the schematic symbols are embedded in the schematic itself.
I generally think of “find and replace all” as being sort of a user-beware, all powerful tool. KiCad generates backups, and at least if you find an “oops” before saving, you also ought to be able to “undo.” The text editor proves that the requisite information is contained in the schematic file. And the dialog box allowed me to check hidden fields. So it seems reasonable to me that find and replace (including hidden fields) ought to have been able to make the changes.
Gripe, moan, complain, etc. But doesn’t that lead to better software?
It sounds to me like the most logical thing would be another checkbox.
BTW; I thought that I had simply specified the wrong power port among the many in my library. But looking at it an hour ago, I could not find GNDREF in the library so I am unsure how I got that to begin with. But PGND is in my library. So basically I was trying to replace all the grounds with a different one which exists in my library.
Sounds like a valid feature request.
However…
The way that label names are now derived from hidden pins in power symbols is still quite hackish. I assume that at some time in the future this will be fixed and the net names can be edited normally in the schematic, just like any other label. Power symbols would then become some sort of fancy labels with extra graphics.
Changing text inside schematic symbols in the schematic editor, instead of the schematic symbol editor is a decision that should not be taken lightly. Usually schematic symbols are checked / vetted / verified meticulously, and errors should be fixed in the libraries. I (and probably many other people) would not be happy if these can be changed accidentally with a simple mistake in an search and replace operation.
The answer from gkeeth goes in the right direction.
The problem is: power ports are special symbols, you cannot simply change the value of a power-port.
You can see this by double-click on the alue of a power-port (PGND/GNDREF) - the value-field in the displayed “edit value field”-dialog is gray (non-functional) with the help-text: “Power symbol value field text cannot be changed”
So your “solution” with Find&replace to change the power-port value has sidestepped the protection against value-change.
It would be great if the power ports appeared in the Symbol fields table but they do not. I had looked at that early in the process. And I do not quite see how it would be done with this:
We have talked about changing how power symbols work in the future so that the net name can be changed from inside the schematic (i.e. you would not need to have a library of dozens of different net names just for the same power symbol). At this point, find & replace should work. I am not sure it’s a good idea to have find & replace make changes inside symbols, even now that symbols are cached in the schematic. But, it could be discussed I supposed.
Thanks. I am somewhat confused as to the moves I have applied within KiCad, but none of them seem to have worked. I think a key point is that I am trying to replace-in a symbol which exists in my library, not concoct something which is not in the library. But with (guess-50) incorrect ground symbols in my schematic and the incorrect text invisible, I would need to eliminate all of the ground symbols and replace all of them individually with mouse operations. Sort of a pain. My text edit stands out as a risky but effective “nuclear option.”
You are right here. There is no easy way to bulk-update a power symbol’s usage in a schematic today unless you go to the library editor and change that symbol itself (and then update all instances of it). Changing the way KiCad works so that the power symbol net name is defined in an editable field rather than as a hidden pin name would be the ideal fix to this.
Once you started replacing texts in a text editor, you have to tread carefully with bug reports, etc. You may have left your schematic in some non-valid state without knowing it.
The way KiCad currently works, the net names derived from power symbols are immutable in those symbols. Which means, that if you want to change them, then do not use Update Symbols from Library, but use Eeschema / Edit / Change Symbols to replace the whole symbol that is not to your liking.
Eeschema / Edit / Change Symbols probably works as a Search and replace to fix the complete symbols.
I guess you can also use: Eeschema / Tools / Edit Symbol Library Links.
The KiCad folder that I posted was from a backup generated before I did the text editor “find and replace.” So far as I know, my text editor operation was successful and I have not tried to undo that in any way…but I have not posted that file or a file derived from it.
@BobZ: my fault.
you have to use Change symbol (not update):
1.) select one of the old GNDREF-values, than doubleclick. You should get the symbol properties dialog
2.) on the right-side of the dialog click button: Change Symbol, you now get the “Change symbols” dialog
3) select radio-button “change symbols matching value”, the value should be prepopulated with “GNDREF”
4.) select new powert port in field “new library identifier”
5.) set checkbox reference+value, click “CHANGE”-button
What I am doing right now…in my layouts with a particular power conversion IC, I feel that I am always “re-inventing” the wheel with my grounding around this IC. In this design today I am trying to use only two layers and decided to keep only PGND and eliminate AGND; eliminate the net tie. Really a couple of vias will serve as the net tie. I used tools>edit symbol library links to replace my several AGND connections.