Moving sheets in a hierarchy without losing the anotations

Kicad 5.1.4 under Win 7.
Hi,
I didn’t find the response to my problem: Here it is:
I made a project years ago with BZR4022. The machine ran for 4 years. I want to build another one.
My current purpose is to make an as-built in line with the existing setting procedure and all the cabling labels already in use.

I recently imported the old project to 5.1.4. A PITA because I don’t have Kicad4.
That said, I made all the corrections with 5.1.4 symbols and footprints pointing to the right places. With no rescue lib because it didn’t work.

I’m now in the process to build a more conventional hierarchy without modifying too much the particularly messy existing one !
An example to make short, I have 6 sheets: 1 calling 2, 3 and 4, 3 calling 5 and 4 calling 6.
I would like to move both sheets 5 and 6 and attach them to sheet 2.
Sheets are very simple, no hierarchical labels, only global ones.
The problem is that there’s no “sheet move” option. I must delete the existing calls to sheet 5 and 6 and recreate them in sheet 2.
If I create the calls in sheet 2 before deleting the original ones, new sheets 5 and 6 lose all the annotations they contain while the original files remain OK until I save the project.
If I delete first the original calls and create them in sheet 2, this results in the same issue. It seems to be linked to their respective time stamp that changes in the new created sheet calls.

However, opened in standalone mode the sheets of the backuped project keep all their references.

Here’s the workaround I found: I reopened the project backuped before the operations and noted the time stamps of the two sheets. I closed it.
Back to the modified project, I opened in Editpad the sheet 2 where the new calls were created. I searched for $Sheet and replaced the respective time stamps by the copied ones.
The labels being lost for the 2 files, I replaced them by the original ones and relaunched the project. All right!

Is there any possibility to move sheets in a more proper way without losing anything ?

TIA.

In KiCad-nightly V5.99 there is a “paste special” that can preserve the references during pasting.

For KiCad V5.1.x the only way I know is to hack into the files with a text editor. One way would be to:

  1. Make a copy of the whole sheet.
  2. Move anything you need to the side and delete the rest.
  3. Save the schematic, exit KiCad.
  4. Use a text edtior to copy the whole text f the components to another sheet.
  5. Open KiCad again, and move stuff to their final location in the new sheet.

With a bit of luck this is easier and faster because you can just copy big blobs of text instead of searching for the timestamps and replacing them.

1 Like

Thanks a lot, Paul.
I’ll be patiently waiting for Kicad6 !
For the moment I know how to solve the issue and I’ve no specific urgency to convert and reorganize other old projects.
I note your procedure that may also be useful.
Kind regards

This procedure works for me too. I used the same method to create a new top level hierarchy sheet in an existing design. Thanks!

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