What is the recommended workflow to create a new project based on a snapshot of an existing project (that has hierarchical sheets)? Conceptually, copying all the existing project’s files and then renaming them to suit the name of the new project?
What I didn’t find:
… so tell me if I missed it!
- “Rename project” command
- “Rename subsidiary sheet” command
What I’ve tried:
Alternative 1. Save As. This creates a duplicate project, where only the project file and top-level schematic are renamed. The subsidiary schematic files retain their original names. That’s maybe unsurprising, but how to rename those subsidiary files? (In topic “How to duplicate a project?”, the advice to Save As didn’t touch on the subsidiary sheet file names.)
Alternative 2. Copy and rename “manually”: Copying the existing project (say using Windows Explorer, or the Save As function). Then rename the files individually (again using Windows Explorer). This breaks the file links in the top-level sch sheet’s hierarachical sheet components, so next, edit these to “relink” them to the newly-renamed subsidiary sheet files.
This used to work in Kicad 5. However, in Kicad 6, this sequence of operations causes the components on the subsidiary sheets to forget their Value and Footprint data. That in turn is because, in K6, that field data is stored in the top-level sheet, and cross-referenced to the component id in the subsidiary sheet. Following the rename and relink the subsheet component data is still present in the top-level sheet file, just the “GUID path” that links it to the subsheet components is broken.
Alternative 3. Copy and paste contents: Create a brand new project, along with top sheet and (empty) subsidiary sheet files, of course named according to the new project’s needs. Then visit each page in the original project and copy-paste its contents to the corresponding page in the new project. (Possible in K6, not in K5). Normal paste will cause all component id numbers to change to X?. However there’s a Paste Special function that retains component id numbers.
So, this method succeeds, but is painfully tedious and error prone for any but small projects.
Did I miss a better way to do this?