Moving parts to another sheet...Reference changes?

So I am reverse engineering a PCB which means I start off with many components at the top level of a sheet and then over time I organise them and move them down into child sheets as I work out the function of that collection.

So for example…

At the moment I have many parts, one of which is a connector Ref J_K83 at the top level

If I select it, Cut it, drill into a child sheet and paste it…

It becomes J_K1

Likewise my ICs get renumbered during the move.

This causes havoc on my PCB since the references have changed.

What is happening here? Can I change the behaviour?

Thanks in advance

Before

2023-11-30_14-42-52

After

You have to:

  • make sure board ↔ schematic are consistent in the first place (update board from schematic)
  • cut the symbol / symbols in the source sheet (probably your root sheet)
  • switch to destination sheet, then use RMB-click–>context menu–>Paste special, choose option “keep reference designators, even if the are duplicated”
  • now synchronize board ↔ schematic again: run again “update board from schematic”, but this time with the option “relink footprints based on their reference designators” checked
  • optional: run “update board from schematic” a last time, this time with the option “relink footprints based on their reference designators” unchecked. This is useful because kicad saves the state of this checkbox - and for normal use it should be unchecked.
1 Like

Accepted solution. Thanks!

Just out of interest… why does it change them at all with Paste vanilla? Seems counter-intuitive?

Only guesswork:
Your usecase is a special case.
The majority of pasting-operations happens with copy/pasting existing symbols. For these cases it’s good that the pasted symbols get their own reference - so no clash in the reference designators and no need for manually annotation.

I could imagine a intermediate step for pasting symbols:

  • first look if a reference is already existing
  • depending on that check:
    • is already existing → create new reference
    • not existing (because you used a “cut”-operation): retain the original reference

If you like such a idea, you should open a feature request at the gitlab bugtracker.

1 Like

Good question.
I am guessing that “Paste Special” was added without giving it much thought. And having to synchronizing the schematic and PCB with the RefDes afterward also seems like a kludge.

A possible solution could (maybe?) be:

  • When using Cut, put it with the UUID and RefDes on the clipboard. There is no fear of duplication as the old version is removed from the schematic.
  • When using Copy, do something else. Maybe reset UUID and Refdes, maybe generate a new UUID for the copy or something else.
  • Maybe create a Copy Special instead of a Paste Special.

The way I see it. The expected behavior of A Cut [Ctrl + X] from one schematic sheet, and a Paste [Ctrl + V] on another sheet should preserve both RefDes and UUID.
But I will not make a feature request for something like that because I do not have enough insight in side effects of such behavior. (Edit: Duh, indeed, see eelik’s remark in the next post).

Unfortunately this is not true. The same can be pasted many times.

1 Like

Of course, Silly me.
What about checking UUID’s during Paste Special and only create new ones when there are duplicates?
There are not very many items on a schematic sheet, and checking them all does not seem like a very big performance problem.

Other options is that Paste Special clears the clipboard, so it can only be pasted once, or if Paste Special exchanges the clipboard content with other UUID’s.

It can’t be too difficult to devise and implement an algorithm that satisfies both user expectations and programming efficiency.

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