Global label vs local label

hi everybody
I put global labels on microcontroller (AVR1280) ports instead of labels (connection label ) . I use only single sheet. Please let me know but I need to do delete all labels then write again all or there any other command to use like replace all once or anything else to do…
Thanks
:neutral_face:

Why do you need to delete the global labels?

They should work as long as you have unique names. (Granted in hierarchical designs they are bad practice but they still work. If you really only have one sheet it should not be a problem.)

Now an attempt for a solution.
The safest option is to do it manually one label at a time from within eeschema.

A quicker method would be to use a text editor with the replace text function.
Warning this is dangerous. You should make a backup before you do anything like that.

A bit of information beforehand. I created a simple schematic to find out what the file will look like. It has all 3 label types in there.

This is what a local label looks like in the file (this label is called local_label)

Text Label 5900 4000 2    60   ~ 0
local_label

A global label looks like this (this label is called global_label)

Text GLabel 5900 3800 0    60   Input ~ 0
global_label

A hirachical label looks like this (this label is called hpin)

Text HLabel 5900 3650 0    60   Input ~ 0
hpin

From that i seem to see that the syntax is something like this:
First line of a label:

  • Keyword Text
  • Type of label (Label, GLabel or HLabel)
  • Position on screen (Two integers)
  • Rotation?
  • Additional information (I’m not sure what exactly.)
    Second line:
  • text of the label (the name or identifier call it what you want)

After we found that out we now know that we can open the schematic file with a text editor and replace GLabel with Label to change the global label to a local label.

5 Likes

PS: this refers to either copying the project folder inclusive content somewhere else or at least hitting this button in the KiCAD project/launcher window:

1 Like