Moving components to hierarchical sheet then updating the PCB

I came across this strange behavior when moving components to a hierarchical sheet, then updating the PCB: the components are “re-added” and moved from their positions if there’s a layout already in place. If I lock them, they’re just added as duplicates.
When I moved them I cut them and then paste special - keep existing reference designators…

To understand (and overcome) this behaviour its necessary to understand the technical background. Kicad identifies all symbols/footprints with an internal UUID-number. The synchronization between schematic <–> board also happens (normally) with this UUID-numbers. The reference-number you see in schematic is only for the user (exception below).
If you copy/paste some symbols in schematic the pasted symbols get new UUID-numbers, different from the original (even if you cut/paste the symbols). So the connection to the already placed footprints (in board) is lost, because they where assigned to the old-symbol-UUID-numbers.

To overcome this the following workflow has to be used:

  • first be sure to have schematic <–>board fully synchronized (run command “Tools–>Update board from schematic”)
  • do your copy/paste/moving in the schematic. Use “paste special → keep existing refrences” (as you have done)
  • with this copy-paste-action you have symbols/footprint-pairs with broken UUID-synchronization, but the Reference-designators are the same. So the next step can resynchronize also the UUID-numbers:
  • Now run again the synchronization-command: “Tools–>Update board from schematic”. But this time set the checkbox “ReLink footprints to schematic symbols based on their refrence-designators”.
  • This should get schematic<–>board again in synchronization, without deleting old and adding new footprints.
  • Last step: run again the synchronization-command: “Tools–>Update board from schematic”. This time the checkbox should be unchecked (unchecked==standard). This ensures that on the next invocation of this dialog the checkbox is set to unchecked state (and you are not accidentally work with checkbox set).

4 Likes

Great, this was very well explained, thank you!

That’s a great explanation. It makes sense from an internals view, but seems rather more complicated than it should be for the average user.

Does anyone know of a technical reason KiCad couldn’t preserve the UUID for the symbol when one is cut & pasted, just as it preserves the reference designator? Obviously there would need to be some limitations on this to avoid repeated pastes from reusing the UUID.

Maybe @craftyjon or someone else more familiar with the internals could weigh in?

Because the link between the schematic and the pcb is path, not just UUID of the symbol. Path includes the sheet path. See Update PCB from Schematic's match methods - #2 by eelik.

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