Symbol value stored in root hierarchical sheet rather than the one it is placed within

I have a project with several hierarchical sheets and within one child sheet I have a 220pF capacitor (C1).

If I open the child sheet directly from a file browser or terminal, the value for a capacitor is missing, but if I open the child sheet via the parent sheet the 220pF value is present.

This has provided some issues with git tracking when I save the child sheet, the value is replaced with a tilde “~”, but if I save the parent sheet it will replace the tilde with 220pF. This is just an example, but I have several components that exhibit this behavior, but not uniformly.

This creates a lot of git diff mess so I wondered if this is just a bug, or intentional and if intentional, why? Shouldn’t values be stored in the sheets which they are within? Whats stranger still is that this doesn’t happen for all components (i.e. I have several other capacitors that don’t have their values stored in the root sheet, but instead in the child sheet). I may have created C1 within the root sheet and cut/pasted it within a child sheet. Would this cause this? If so, how can I clean it up, such that all values for symbols are stored in their own sheets?

Edit:
Adding setup info:
OS: Ubuntu 20.04 LTS
KiCAD: 6.0.4
Installed via apt-get as per (Install on Ubuntu | KiCad EDA)

KiCad version is critical information here.

Indeed! Sorry I neglected to post that. See edited question above.

This is intentional. See also Version control churn when reusing sub-sheets (#11035) · Issues · KiCad / KiCad Source Code / kicad · GitLab. Currently supported workflow allows editing subsheets only through editing root sheet, and then navigating to mentioned subsheet.

1 Like

Thanks for the link. I’d say your open issue here is more current and relevant though.

Are you aware of any way to workaround this at the moment? For example if I have SheetA in ProjectA that I want to reuse with associated footprints, how can I reuse this in ProjectB?

From what I tested/played around with, if you try to make a copy of the SheetA and place it into ProjectB via a new hierarchical sheet, it will lose the footprint and other data. Alternatively if you open SheetA while still in ProjectA and select all and copy, then close everything, open ProjectB, make a new hierarchical sheet, and paste, everything is retained. Seems like a silly workflow, but it works for now I guess.

Edit1: I note you must do two more things to preserve everything:

  1. You must “paste special” to preserve the annotations (otherwise nothing will link the PCB with the schematic).
  2. You must import the PCB settings from the previous PCB (or manually merge what you want).

I had no issues with footprint and value entries. It is only the references that are lost and I have no issue with this.

If you loose footprint and value entries when reusing sheets in other project and can reproduce it, I’d report this as a bug

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.